xdef _hndcode ; this is hndcode(InputEvent,Data) xref _IntuitionBase ; A0 A1 _hndcode CMPI.B #1,4(A0) ; is event class = RAWKEY? BNE.S skip1 ; no - bye BTST #6,9(A0) ; is modifier = L-Amiga? BEQ.S skip1 ; no - bye CMPI.W #$37,6(A0) ; is key = M? BNE.S skip1 ; no - bye MOVEM.L A2/A6,-(A7) ; save regs A2 & A6 MOVEA.L A0,A2 ; A2 -> input event MOVEA.L 4,A6 ; A6 = ExecBase JSR -$84(A6) ; Forbid() MOVEA.L _IntuitionBase,A6 ; A6 = IntuitionBase MOVEA.L $3C(A6),A0 ; A0 = FrontScreen JSR -$F6(A6) ; ScreenToBack() MOVEA.L 4,A6 ; A6 = ExecBase JSR -$8A(A6) ; Permit() MOVE.L (A2),D0 ; D0 = ie->NextEvent MOVEM.L (A7)+,A2/A6 ; restore regs A2 & A6 RTS ; return ie->NextEvent skip1 MOVE.L A0,D0 ; D0 = ie RTS ; return ie END