First post, by WhiteFalcon
- Rank
- Member
As I am (again) getting back to DOS programming in C/asm, I have stumbled upon a delicate mouse problem. After initializing the mouse, using interrupt 0x33 service 3 I read the registers to get the mouse status.
Registers CX and DX work fine, but BX acts weird. I have a simple loop waiting for left button click to finish the program. It works okay the first time I run it, every other run it immediatelly finishes. After some debuggins sessions I found out that BX & 0x01 just stays set after the first cycle, even though the mouse was initialized again and int 0x33 was called again too.
It does work fine after compiling the program and running it from the command line. I thought it could be the Borland IDE so I installed a VMWare MS-DOS 6.22 machine and tried my source code there. It not only works from the command line, but also from the IDE itself. It seems there is some problem with Borland C++ vs DOSBox, has anyone else noticed that? Is there any trick/setting to fix it? I also noticed that Borland C++ in DOSBox keeps repeating that the source code changed every time I compile it, even though there was no change, but I guess thats probably not related.
Everything is fine when run on my retro PC too, but I have access to it only a few times per year. I really really like the Borland C++ IDE and would like to be able to use it with DOSBox.
Olivetti M4 P75, 32MB RAM, 4GB HDD, 8GB CF, CD-ROM, SoundBlaster AWE 64, Gravis Ultrasound MAX, Roland SCC-1, Roland MT-32, Roland CM-64
Intel 486DX2/66Mhz, 16MB RAM, VGA Trident 512kB, 1.6GB HDD WD, CD-ROM, 256MB CF, SoundBlaster 16 Pro (CT2910)