home *** CD-ROM | disk | FTP | other *** search
- J:
-
- MOVE.L #COPPER,$DFF080
- ROXL.W $DFF088
- GETJOY:
- ; Test FIRE
-
- tst.b $bfe001
- bpl QUIT
-
- move.l #$dff00c,a0
- clr.l d0
- move.w (a0),d0
-
- ; Test LEFT
-
- btst #9,d0
- beq RIGHT
- bsr rotate
- btst #8,d0
- beq notup
- move.w #$0f0f,col+2
- jmp GETJOY
- notup: btst #0,d0
- beq notdown
- move.w #$0ff0,col+2
- jmp GETJOY
- notdown: move.w #$0f00,col+2
- jmp GETJOY
-
- ; Test RIGHT
-
- RIGHT: btst #1,d0
- beq up
- bsr rotate
- btst #8,d0
- beq notup2
- move.w #$666,col+2
- jmp GETJOY
- notup2: btst #0,d0
- beq notdown2
- move.w #$006,col+2
- jmp GETJOY
- notdown2:
- move.w #$00f0,col+2
- jmp GETJOY
-
- ROTATE: move.l d0,d1
- lsr.l #1,d0
- eor.l d1,d0
- rts
-
- ; Test UP
-
- up: bsr rotate
- btst #8,d0
- beq DOWN
- move.w #$000f,col+2
- jmp GETJOY
-
- ; Test DOWN
-
- DOWN: btst #0,d0
- beq NOJOY
- move.w #$0fff,col+2
- jmp GETJOY
-
- NOJOY: move.w #$0000,col+2
- jmp GETJOY
-
- QUIT: rts
-
- COPPER: DC.W $0100,$0200
- COL: DC.W $0180,$0000
- DC.W $FFFF,$FFFE