1
0
mirror of https://github.com/RevCurtisP/C02.git synced 2024-11-30 23:50:04 +00:00
C02/test/echohex.c02

22 lines
638 B
Plaintext

/*******************************************************
* ECHOHEX - Test/Demo program for C02 Standard Header *
* Displays ASCII Code of Typed Keys to Screen *
* RETURN/ENTER moves to new line *
* ESCAPE/STOP key Ends Program *
*******************************************************/
//Specify System Header using -H option
char key; //Key value
main:
putstr("PRESS KEYS TO DISPLAY"); newlin();
putstr("ESCAPE/STOP TO END"); newlin();
while() {
key = getchr();
prbyte(key);
putchr(' ');
if (key==#RTNKEY) newlin();
if (key==#ESCKEY) goto exit;
}