Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Reading Kempston Joystick using function IN 31
#2
ZX Basic supports the IN and OUT instructions. If you cannot compile them then there is a syntax error.

Reading the listings in the page, remember that ZX BASIC, at this moment, requires every IF to be closed with END IF.
E.g.
Code:
10 LET x=10: LET y=10
20 LET kj=IN 31: REM get the state of joystick
30 PRINT AT y,x;"*"
40 IF (kj>31) OR (kj=0) THEN GO TO 20: END IF: REM ignore spurious inputs
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)