Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!uoregon!lth From: lth@uoregon.uoregon.edu (Lars Thomas Hansen) Newsgroups: comp.sys.ibm.pc Subject: Re: problems trying to intercept msdos function requests Message-ID: <3932@uoregon.uoregon.edu> Date: 23 Feb 89 01:12:08 GMT References: <3204@ttrdc.UUCP> <788@ethz.UUCP> Reply-To: lth@drizzle.UUCP (Lars Thomas Hansen) Organization: University of Oregon, Computer Science, Eugene OR Lines: 23 In article <788@ethz.UUCP> zu@bernina.UUCP (Urs Zurbuchen) writes: >Why do you use an interrupt vector to store the old vector, anyway. Just >get the old vector from DOS (AH=35h, AL=number, INT 21h) save it >somewhere in your program's memory space. Then set your entry point via >DOS (AH=25h,AL=number,INT 21h). You will then hopefully get called :-) > >To chain to the original interrupt handler issue a far JMP (or CALL, but >I'd prefer JMP) indirect via the vector you stored in your program's >work space. Have you considered that the DOS routine called via the FAR JMP/CALL will issue an IRET (which pops three words off the stack; FLAGS, IP and CS) and not a RET (which pops only IP and CS)? I think this is a sticky issue. The scheme of putting the original interrupt vector somewhere and doing a software interrupt to get at it might actually be safer. --lars --------------------------------------------------------------------------- "Even if you win the rat race, you're still a rat" ---------------------------------------------------------------------------