Konamiman / Nextor

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

BDOS call does not return to caller on error, goes to BASIC error handling instead #66

Closed Eugeny1 closed 4 years ago

Eugeny1 commented 4 years ago

See the issue #59.

The problem is related to BDOS call 016h.

Now system does not crash, but there's still a problem: in case of disk error (e.g. write protected or disk missing in the drive) the execution goes to the BASIC error handler and terminates into BASIC prompt with respective message "Disk offline" or "Disk write protected" instead of returning to the BDOS caller with A=0ffh (error condition).

Eugeny1 commented 4 years ago

I seem to be wrong. Tried with original MSX-DOS2, and in BASIC mode it also breaks into the BASIC on hardware error, in DOS it goes to "Abort/Retry/Ignore" (as Nestor was suspecting). Thus it seems that the function will return to caller only in case there's a "soft" error, in case of hardware error programmer must intercept error handler to get a return to his code. The example of the code can be seen in the MSX disk boot sector.