|
-
September 19th, 2001, 10:17 AM
#1
Disabling Interrupts
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
-
September 19th, 2001, 11:59 AM
#2
Re: Disabling Interrupts
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
-
September 20th, 2001, 02:23 AM
#3
Re: Disabling Interrupts
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|