home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.intel
- Path: sparky!uunet!mcsun!sun4nl!dutrun!dutiws!wiltinkm
- From: wiltinkm@dutiws.twi.tudelft.nl (M. Wiltink.a73A.telnr-015-138378)
- Subject: Re: CS and IP problem
- Message-ID: <BzAwp0.C98@dutiws.twi.tudelft.nl>
- Keywords: What's stored on INT
- Organization: Delft University of Technology
- References: <1g76bgINNlk2@mercury.kingston.ac.uk> <Bz3pp5.AAw@bailgate.gpsemi.com>
- Date: Tue, 15 Dec 1992 12:43:48 GMT
- Lines: 45
-
- In article <Bz3pp5.AAw@bailgate.gpsemi.com> lee_b@sn4901.oldham.gpsemi.com (Lee Burley) writes:
- >Are the SC:IP pair pushed onto the stack after an interrupt??
- >
- >if so then
- >
- > POP AX
- > MOV AX, {cs store}
- > POP BX
- > MOV BX, {ip store}
- > PUSH BX
- > PUSH AX
- >
- >might work??
- >
- >PS I might have got the mnemonics a bit wrong, it has been a long time
- >since I did any assembler on the 80X86!!
-
- If I'm right, the top of the stack will look like this after an interrupt:
-
- +----+
- | IP |
- +----+
- | CS |
- +----+
- | SR | Read Flags-register
- +----+
- | .. |
-
- Near Call will push IP
- Far call will push CS, IP
- Interrupt will push Flags, CS, IP
-
- RTI will pop IP, CS, Flags
- Far Ret will pop IP, CS
- Near Ret will pop IP
-
- An assembler I know actually emulated Far call by PUSH CS, NEAR CALL. It works.
-
- ---------------------------------------------------------------------------
- wiltinkm@dutiws.twi.tudelft.nl
- Maarten Wiltink
-
- Department of Applied Mathematics and Computer Science
- Delft University of Technology
- The Netherlands
-