Konamiman / Nextor

A disk operating system for MSX computers, forked from MSX-DOS 2.31
Other
183 stars 35 forks source link

VIEW.COM crashes under Nextor #29

Closed gdx-msx closed 5 years ago

gdx-msx commented 5 years ago

The system crashes when I use VIEW.COM under Nextor 2.10 beta. Tested on emulator and real FS-A1ST and Sunrise with driver v0.17. https://www.msx.org/downloads/viewcom

grauw commented 4 months ago

I think I ran into this issue today, using MegaFlashROM SCC+ SD on Nextor 2.1.0 alpha 2.

When I write to file handle 1 (stdout) 255 times it crashes the system.

Specifically, I think this was because change ff73d24 (June 3, 2014; 2.1.0 alpha 1b) introduced a call to rdwr_device and then jumps to RDWR_END, however this rdwr_device routine ends by jumping to rdwr_dev_done which also passes by RDWR_END. As a result the RW_LEVEL## counter underflows and after 255 iterations executes the pops even though nothing was pushed. A short while later this causes all pages to be set to slot 0 and the system crashes. This change was undone here in 6ecd074 (Feb 11, 2019; 2.1.0 beta 2).

Unfortunately, I just updated my MegaFlashROM SCC+ SD to the latest firmware and it’s still using Nextor 2.1.0 alpha 2. Guess I’ll use _CONOUT to print my strings instead of writing to the standard output file handle 🙁.

Just posting my findings here for posterity; no action required.