First post, by McCoy
I'm programming a small game for MS-DOS in ASM using Turbo Assembler. As it's such a nuisance to develop in pure DOS, I'm developing in DosBox. So far, everything has worked perfectly, everything which worked in DosBox also worked in real DOS (v6.22). But I've come to a thing which behaves differently.
I manage the game's timing using the RTC. For that, I activate the RTC and also activate the PIE flag at register B so it will generate an interruption which executes the code pointed at the address stored in the interruption vector 1C0h (70h*4). This is the code of my attention routine for that periodic interruption:
CLIPUSH AX;testing it was PIE who interrupted;***************MOV AL, 0CH ;we're going to read register C of the RTCOUT 070H,AL ;send it to port 70hIN AL,071H ;put register C's content into ALAND AL,01000000b ;test that PF is 1JZ return ;if it's not, return;***************MOV CS:FLAG, 1 ;mark that a RTC cycle has passed.return: ; send EOI to the PICsMOV al, 020H ; load EOIOUT 020H, al ;send EOI to master PICOUT 0A0H, al ;send EOI to slave PICPOP AXSTIIRET
That works in DOS. But it freezes the game in DosBox. BUT, if I remove the code which reads the C register for testing PF (de code between the ***********), it works in DosBox just as the original code worked in MS-DOS. But, it doesn't work in MS-DOS (the game freezes exactly as in DosBox whith the complete code). So I think the way the RTC is implemented in DosBox is a little bit different than from a real PC.
My DosBox version is 0.63, so maybe this is fixed in CVS.
I think this is not a very important thing, but I thought it would be good to know, just in case.
...unless I'm wrong.