home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 200-299 / ff229.lzh / Shuffle / hndcode.asm < prev    next >
Assembly Source File  |  1989-07-20  |  909b  |  25 lines

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