wesmond, on Fri May 18, 2012 8:57 AM, said:
10 K=PEEK(764):IF K=255 THEN GOTO 10
20 PRINT K:POKE 764,255:GOTO 10
No, this is wrong! By using PEEKs and POKEs you're descending to the level of the Commodore 64! The way of scanning the keyboard in Atari BASIC isn't by using INKEY$ , but by using GET, as well as a particular syntax involving the use of # and devices which each end in a colon. The listings I read for other BASICs all tried to read keypresses from the keyboard instead of using a joystick, which may not have been supplied with the computer. I think that all Atari computers may have come with a joystick, though. The Atari BASIC editor accepted the statement A$=INKEY$, but it seems that only meant it thought that INKEY$ was a variable. I don't fully understand the command for doing this at the moment, but I'll post it here as soon as I do! The orignal listing I converted even worked on the Sinclair ZX81, so this shows you how crap the Commodore 64 was!
Edited by SIO99, Fri May 18, 2012 5:14 PM.













