Skip to content

Commit

Permalink
Make the DOSVER function call return 6Fh in C in DOS 1 mode
Browse files Browse the repository at this point in the history
The MSX-DOS 2 documentation says that DOSVER in DOS 1 returns B=0
and C undefined, but the fact is that in MSX-DOS 1 register C is
preserved (so 6Fh) and seems like some programs rely on that fact
to detect the DOS 1 mode. Nextor was corrupting C in this case,
so even if strictly speaking that shouldn't be an issue, this commit
changes the behavior of DOSVER in DOS 1 to return C=6Fh.
  • Loading branch information
Konamiman committed Oct 28, 2023
1 parent 181d3e0 commit 0bcecfa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/kernel/bank4/partit.mac
Expand Up @@ -4169,7 +4169,7 @@ IDRVR_RET:

DOSV1_2:
xor a
ld b,a
ld bc,_DOSVER## ;Make B=0 and preserve C, some programs actually check it
ret


Expand Down

0 comments on commit 0bcecfa

Please sign in to comment.