interrupts

87 views
Skip to first unread message

ee6...@sdcc14.uucp

unread,
May 7, 1987, 9:40:27 PM5/7/87
to

I am attempting to write an interrupts handling routine
in Microsoft C, and have been having some difficulty. Presently, I am
installing a short assembly language routine that saves registers,
and then calls my C routine. Once it is installed, my program then
tries to call the interrupt trhough the Microsoft C int86() function.
I know that the routine is installed correctly, because when
I perform the interrupt from a program, it makes it to my routine, and
works fine. Unfortunately, it never makes it back to the main program
once its done, but instead, locks everything up. I am using one of the unused
interrupts, so I shouldn't be conflicting with any system things.
Is there anybody out there who has tried something similar, or who knows of something I might be doing wrong? Any help would be greatly appreciated.

Steve

ro...@mtgzz.uucp

unread,
May 11, 1987, 11:48:30 AM5/11/87
to
In article <2...@sdcc14.UUCP>, ee6...@sdcc14.UUCP (Steve Burnap) writes:
> [...]

> in Microsoft C, and have been having some difficulty. Presently, I am
> installing a short assembly language routine that saves registers,
> and then calls my C routine. Once it is installed, my program then
> tries to call the interrupt trhough the Microsoft C int86() function.
> [...]

> works fine. Unfortunately, it never makes it back to the main program

Are you sure that all your CALLs and RETs match up. That is are they
all far and near. Specifically, after you return to the assembly routine
do you restore all registers and do an IRET instead of a regular RET.
(IRET pops 3 words, the saved return address, and the flags).

--
Tom Rosenfeld @ AT&T Information Systems Labs, Middletown, NJ
(201) 957-5867
UUCP: {harpo,ihnp4,burl,akgua}!mtgzz!rosen
Disclaimer: I don't claim anything.

Reply all
Reply to author
Forward
0 new messages