From 0bcecfa851795a4425046581d961fe0b96a9f117 Mon Sep 17 00:00:00 2001 From: Nestor Soriano Date: Sat, 28 Oct 2023 23:31:58 +0200 Subject: [PATCH] Make the DOSVER function call return 6Fh in C in DOS 1 mode 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. --- source/kernel/bank4/partit.mac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/kernel/bank4/partit.mac b/source/kernel/bank4/partit.mac index 94c0c441..633d4016 100644 --- a/source/kernel/bank4/partit.mac +++ b/source/kernel/bank4/partit.mac @@ -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