Joystick position: Difference between revisions

→‎{{header|ZX Spectrum Basic}}: requires a bit more than that, alas - Kempston returns 000FUDLR on port 31, Sinclair IF2 returns 111lrduf on port 61438 (yes, that's a 1 if off)...
m (syntax highlighting fixup automation)
(→‎{{header|ZX Spectrum Basic}}: requires a bit more than that, alas - Kempston returns 000FUDLR on port 31, Sinclair IF2 returns 111lrduf on port 61438 (yes, that's a 1 if off)...)
Line 1,662:
 
=={{header|ZX Spectrum Basic}}==
Assuming a Kempston joystick interface, fairly standard at the time. Rewriting for the Sinclair Interface 2 involves changing line 80 to 80 LET t=IN 61438, replacing all numbers in the next five lines with 191-said number and reversing each pair of directions.
 
<syntaxhighlight lang="zxbasic">10 DIM o$(5)
77

edits