mirror of
https://github.com/RevCurtisP/C02.git
synced 2024-11-22 01:31:33 +00:00
22 lines
638 B
Plaintext
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;
|
|
}
|