Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!uwvax!uwmacc!vms.macc.wisc.edu!yingda From: yingda@vms.macc.wisc.edu (Ying-Da Lee) Newsgroups: comp.sys.ibm.pc Subject: Re: Help needed with MASM and Interrupts Message-ID: <1802@uwmacc.UUCP> Date: Thu, 3-Sep-87 11:23:21 EDT Article-I.D.: uwmacc.1802 Posted: Thu Sep 3 11:23:21 1987 Date-Received: Sat, 5-Sep-87 10:40:30 EDT References: <69@sickkids.UUCP> Sender: news@uwmacc.UUCP Reply-To: yingda@uwwircs.UUCP (Ying-Da Lee) Organization: UW-Madison Academic Computer Center Lines: 32 In article <69@sickkids.UUCP> gw@sickkids.UUCP (CFI/Graham Wilson (977-5450) [RI7921Z]) writes: >I am writing an interrupt handler and have run into a snag with MASM. >The solution may be obvious, but I can't seem to figure it out. > >The situation is as follows. The clock tick (IRQ0) has been speeded up >by a factor of 32, and IRQ0 (INT 8) jumps to my routine. Every 32 interrupts, >control passes to the BIOS INT 8 handler when my routine is done. The >problem is that I can't figure out how to pass control to the BIOS routine. > >I tried saving the offset and segment values from the interrupt table >before changing to my address. These values are saved as *CODE SEGMENT* >variables jmpoff and jmpseg respectively (in that order). If control >is to pass through to BIOS, I execute the command: > > jmp FAR [cs:jmpoff] > What you need is jmp dword ptr cs:jmpoff Alternatively, you could define an additional label, e.g., old_int8 equ dword ptr $ jmpoff dw ? jmpseg dw ? then a simple jmp cs:old_int8 will do.