home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1987 June / Ahoy_Magazine_87-06_1987_Double_L.d64 / Jiffies (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  697b  |  21 lines

  1. 0 rem << rr42-1 >>
  2. 1 rem===================================
  3. 2 print"[147]       jiffies"
  4. 3 rem        rupert report #42
  5. 4 rem          for c128/c64
  6. 5 print" display state of joystick #2"
  7. 6 rem    button & show times
  8. 9 rem===================================
  9. 10 j2=56320 : p0=111 : p1=127
  10. 20 if peek(j2)=p1 then 20 :rem wait till button is pressed
  11. 30 t0=ti                :rem start timer
  12. 40 print"0"; : if peek(j2)=p0 then 40
  13. 50 tm=ti-t0 : print     :rem stop timer
  14. 60 print tm;"jiffies (";tm/60;"seconds)"
  15. 70 goto 20              :rem repeat
  16. 80 rem ---------------------------------
  17. 90 rem:add line 25 goto 100 to come here----------------------------------------
  18. 100 print"0"; : if peek(j2)=p0 then 100
  19. 110 print"1"; : if peek(j2)=p1 then 110
  20. 120 goto 100
  21.