home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1987 June
/
Ahoy_Magazine_87-06_1987_Double_L.d64
/
Jiffies
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
697b
|
21 lines
0 rem << rr42-1 >>
1 rem===================================
2 print"[147] jiffies"
3 rem rupert report #42
4 rem for c128/c64
5 print" display state of joystick #2"
6 rem button & show times
9 rem===================================
10 j2=56320 : p0=111 : p1=127
20 if peek(j2)=p1 then 20 :rem wait till button is pressed
30 t0=ti :rem start timer
40 print"0"; : if peek(j2)=p0 then 40
50 tm=ti-t0 : print :rem stop timer
60 print tm;"jiffies (";tm/60;"seconds)"
70 goto 20 :rem repeat
80 rem ---------------------------------
90 rem:add line 25 goto 100 to come here----------------------------------------
100 print"0"; : if peek(j2)=p0 then 100
110 print"1"; : if peek(j2)=p1 then 110
120 goto 100