10000

10100
10200
10300
10400
11000
11999
12000
12010
12020
13000
13010
13110
13120
13999
14000
14010
14020
14999
15000
15010
15020
15999
16000
16010
16020
16999
17000
17010
17020
17999
20000
20010
20020
20100
20999
21000
21010
21020
21999
22000
22010
22020
22999
23000
23010
23020
23999
24000
24010
24020
24999
25000
25010
25020
25999
50000
50010

rem *****************************
rem * joystick test
rem * adapted from ray carlsen
rem *
rem
printchr$(147):rem clear screen
rem
rem joystick port 1
print"port 1"
print"------"
rem north = bit 0
p1=peek(56321)
ifp1and1thenprint"nrth":goto14000
print"{rvon}nrth{rvof}"
rem
rem south = bit 1
ifp1and2thenprint"sout":goto15000
print"{rvon}sout{rvof}"
rem
rem west = bit 2
ifp1and4thenprint"west":goto16000
print"{rvon}west{rvof}"
rem
rem east = bit 3
ifp1and8thenprint"east":goto17000
print"{rvon}east{rvof}"
rem
rem fire = bit 4
ifp1and16thenprint"fire":goto20000
print"{rvon}fire{rvof}"
rem
rem joystick port 2
print"{down}port 2"
print"------"
p2=peek(56320)
rem
rem north = bit 0
ifp2and1thenprint"nrth":goto22000
print"{rvon}nrth{rvof}"
rem
rem south = bit 1
ifp2and2thenprint"sout":goto23000
print"{rvon}sout{rvof}"
rem
rem west = bit 2
ifp2and4thenprint"west":goto24000
print"{rvon}west{rvof}"
rem
rem east = bit 3
ifp2and8thenprint"east":goto25000
print"{rvon}east{rvof}"
rem
rem fire = bit 4
ifp2and16thenprint"fire":goto50000
print"{rvon}fire{rvof}"
rem
printchr$(19):rem home cursor
goto12000:rem next test cycle

Sign up to vote on this title
UsefulNot useful