Classic Computer Magazine Archive PROGRAM LISTING: 88-01/SSIJOY6.M65


0100 ; SSI JOYSTICK DRIVER (6-WAY)
0110 ; BY RICH MOORE
0120 ;(c)1987, ANTIC PUBLISHING
0130 ;
0140 ; SYSTEM EQUATES
0150 SETVBV = 58460
0160 XITVBV = 58466
0170 STICK0 = 632
0180 INITAD = 738
0190 CH  =   764
0200 ;
0210 ; DOS 2.0 EQUATES
0220 XRENAME = $0BD9
0230 ERDVDC = $12BF
0240 ;
0250     *=  XRENAME
0260 ;
0270     JMP ERDVDC
0280 INSTALL
0290     LDY # <VBD
0300     LDX # >VBD
0310     LDA #7
0320     JMP SETVBV
0330 ;
0340 VBD
0350     LDA STICK0
0360     AND #15
0370     CMP #15
0380     BEQ DONE
0390 ;
0400     LDX #5      ;Match stick
0410 ;                position
0420 L1  ;           (N/NE/SE/S/SW/NW)
0430 ;                to a
0440     LDY KEY,X   ;keyboard code
0450     CMP POS,X
0460     BEQ DELAY
0470     DEX 
0480     BPL L1
0490     BMI DONE    ;Exit if no match
0500 ;
0510 DELAY
0520     DEC TIMER
0530     BPL DONE
0540     LDX #3
0550     STX TIMER
0560 ;
0570 PRESS
0580     STY CH      ;Enter the code
0590 DONE
0600     JMP XITVBV  ;and exit
0610 ;
0620 TIMER
0630     .BYTE 3
0640 ;
0650 KEY
0660     .BYTE 31    ;"1"
0670     .BYTE 30    ;"2"
0680     .BYTE 26    ;"3"
0690     .BYTE 24    ;"4"
0700     .BYTE 29    ;"5"
0710     .BYTE 27    ;"6"
0720 POS
0730     .BYTE 14    ;NORTH
0740     .BYTE 6     ;NE
0750     .BYTE 5     ;SE
0760     .BYTE 13    ;SOUTH
0770     .BYTE 9     ;SW
0780     .BYTE 10    ;NW
0790 ;
0800     *=  INITAD
0810     .WORD INSTALL
0820     .END 

Back to previous page