Keyboard input/Keypress check: Difference between revisions

no edit summary
(Keyboard input/Keypress check in various BASIC dialents (BASIC256, QBasic and Yabasic))
No edit summary
Line 53:
If key was pressed, Available is set to True and Ch contains the value.
If not, Available is set to False.
 
=={{header|Amazing Hopper}}==
Version: hopper-FLOW!
<lang Amazing Hopper>
#include <flow.h>
 
DEF-MAIN(argv, argc)
BREAK-ON
SET(c,0)
WHILE (1)
COND( KEY-PRESSED? )
SCAN-CODE(c)
BREAK-IF ( c ) IS-ESCAPE
CEND
PRNL( "CODE = ", c )
WEND
PRNL( "Last key pressed: ", c )
END
</lang>
{{out}}
<pre>
CODE = 0
:
CODE = 100
:
Last key pressed: 27
$
</pre>
 
=={{header|ARM Assembly}}==
543

edits