Click to See Complete Forum and Search --> : Disabling Interrupts
mcilfone
September 19th, 2001, 10:17 AM
hi gurus,
I have a problem, I have to disable (for a very short time...) the system interrupt, 'cause these don't allow me to work with the RTS signal in a serial port as I want.
I made this with Borland C++4.0 compiler, but with MS Visual C++ I don't find the corresponding instruction.
Is it possible to disable the interrupts under Win98 or WinNT? If yes, how can I do?
best regards micky
Paul McKenzie
September 19th, 2001, 11:59 AM
Was it a 16-bit DOS/Windows program that you created with Borland 4.0? If it was, then you should realize that the current versions (since 4.0) of Visual C++ do not create 16-bit programs.
Also, you must realize that Windows 98 and Win NT are 32-bit operating systems. Many of the "tricks" that you can do with interrupts in a 16-bit program are not possible in a 32-bit operating system. This is why you won't find any functions that have anything to do with interrupts in the VC++ compiler (functions like int86(), int86x(), segread(), etc.) because they cannot be used in a 32-bit OS. You may have to write a device driver or go into "kernel" mode to implement what you want to do. Also, I believe it is much more difficult to do this in Win NT than in Win 98, since Win98 has its roots in DOS while Win NT does not.
Regards,
Paul McKenzie
Umair Ahmad
September 20th, 2001, 02:23 AM
if you are in DOS, simply clearing the interrupt bit in the status register would do it.
A simple assembly instruction: CLI allows you to disable interrupts. Enable them with STI.
The more control, the more that needs control.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.