Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!ut-emx!walt.cc.utexas.edu!readdm From: readdm@walt.cc.utexas.edu (David M. Read) Newsgroups: comp.os.msdos.programmer Subject: Re: Programming the Mouse Message-ID: <34725@ut-emx.UUCP> Date: 31 Jul 90 05:54:46 GMT References: <1990Jul30.182430.7493@uokmax.uucp> Sender: news@ut-emx.UUCP Reply-To: readdm@walt.cc.utexas.edu (David M. Read) Organization: UT-Austin / Jerry's Kids Lines: 35 In article [abridged] gene@uokmax.uucp (Gene E. Johannsen) writes: !> !> I am writing a program that I want to use the mouse with. I don't !>have a reference work to the mouse so I am using a list of interrupts. Below !>is a small program I writing to learn how to use the mouse. All it will do is !>set up and turn on the mouse and then print an '*' when I press the left !>button. It prints the '*' but freezes immediately afterwards: !> !>.MODEL SMALL !> !>.CODE !> !> [...] !> !>BUTTON PROC FAR !> push ax ;This is where the problem comes. It prints !> push dx ;the '*' okay, but then it freezes. !> mov ah,02h !> mov dl,2ah !> int 21h !> pop dx !> pop ax !> ret ^^^ !>BUTTON ENDP !> !> END > I may be wrong here, but shouldn't this be an 'iret' instruction? After all, the routine *is* an interrupt service routine, called by a hardware interrupt...If you return with a regular 'ret' call, none of the registers are popped off the stack and restored to their state before the interrupt, and the CPU doesn't know where to pick up, so it *should* freeze! -Dave