home *** CD-ROM | disk | FTP | other *** search
- Unit GameInt9;
-
- INTERFACE
-
- Uses
- DOS,CRT;
-
- Var
- Left,
- Right,
- Space,
- Escape : Boolean;
- P : Byte;
-
- IMPLEMENTATION
-
- Var
- OldExitProc,
- SaveInt09 : pointer;
-
- procedure JmpOldISR(OldISR: pointer);
- inline($5B/$58/$87/$5E/$0E/$87/$46/$10/$89/
- $EC/$5D/$07/$1F/$5F/$5E/$5A/$59/$CB);
-
- {$F+}
- procedure Key_ISR( Flags,CS,IP,AX,BX,CX,DX,SI,DI,DS,ES,BP:word ); Interrupt;
- Begin
- P := Port [$60];
- If ( P = 75 ) Then
- Left := TRUE
- Else
- If ( P = 77 ) Then
- Right := TRUE
- Else
- If ( P = 57 ) Then
- Space := TRUE
- Else
- If ( P = 1 ) Then
- Escape := TRUE
- Else
- JmpOldISR( SaveInt09 );
-
- Inline($E4/$61/$8A/$E0/$0C/$80/$E6/$61/ { Clean up as the }
- $86/$E0/$E6/$61/$B0/$20/$E6/$20); { Bios would }
- End;
-
- Procedure Int09ExitProc;
- Begin
- ExitProc := OldExitProc;
- SetIntVec( 9, SaveInt09 );
- end;
- {$F-}
-
- Begin
- OldExitProc := ExitProc;
- ExitProc := @Int09ExitProc;
- GetIntVec( 9, SaveInt09 );
- SetIntVec( 9, @Key_ISR );
-
- Left := FALSE;
- Right := FALSE;
- Space := FALSE;
- Escape := FALSE;
- end.
-