home *** CD-ROM | disk | FTP | other *** search
- ;:ts=8
- public _BabyInputHandler
- *
- * BabyInputHandler by Mike Stark
- * ----------------
- *
- * An input handler which effectively shuts down intuition. This handler
- * checks if the event which it is passed is a keyboard event. If it is,
- * it sends a copy of the event to the KeyBang program and then sets the
- * message type to NULL so that intuition will ignore it. It also zeros
- * the qualifier on all events.
- *
- * BabyInputHandler is meant to be installed as an input handler. When it
- * is called, A0 contains the address of the input event to be processed and
- * A1 contains the address of data which is initialized by the program which
- * installed the handler. In this case, (A1) contains the address of the
- * message port to which the input messages will be copied and 4(A1) contains
- * SysBase, the address of the system library.
- *
-
- _BabyInputHandler:
- movem.l .3,-(sp)
- move.l a0,a4
- move.l a1,a5
- move.l a0,a2
- .4
- move.l a2,d0
- beq .5
- cmp.b #1,4(a2)
- bne .6
- move.l #42,d0
- move.l #1,d1
- move.l 4(a5),a6
- jsr -198(a6)
- move.l d0,a3
- move.l a3,a0
- add.l #20,a0
- move.l a2,a1
- move.l #4,d0
- .7
- move.l (a1)+,(a0)+
- dbra d0,.7
- move.w (a1)+,(a0)+
- move.l (a5),a0
- move.l a3,a1
- jsr -366(a6)
- clr.b 4(a2)
- .6
- clr.w 8(a2)
- move.l (a2),a2
- bra .4
- .5
- move.l a4,d0
- .8
- movem.l (sp)+,.3
- rts
- .2 equ 0
- .3 reg a2/a3/a4/a5
- public .begin
- dseg
- end
-