2018-08-19 22:24:02 +00:00
|
|
|
/*******************************************************
|
|
|
|
* ECHOHEX - Test/Demo program for C02 Standard Header *
|
|
|
|
* Displays ASCII Code of Typed Keys to Screen *
|
2019-11-20 06:08:09 +00:00
|
|
|
* RETURN/ENTER moves to new line *
|
2018-08-19 22:24:02 +00:00
|
|
|
* ESCAPE/STOP key Ends Program *
|
|
|
|
*******************************************************/
|
|
|
|
|
|
|
|
//Specify System Header using -H option
|
|
|
|
|
|
|
|
char key; //Key value
|
|
|
|
|
|
|
|
main:
|
2019-11-20 06:08:09 +00:00
|
|
|
putstr("PRESS KEYS TO DISPLAY"); newlin();
|
|
|
|
putstr("ESCAPE/STOP TO END"); newlin();
|
2018-08-19 22:24:02 +00:00
|
|
|
while() {
|
2018-09-17 00:53:34 +00:00
|
|
|
key = getchr();
|
2018-08-19 22:24:02 +00:00
|
|
|
prbyte(key);
|
2018-09-17 00:53:34 +00:00
|
|
|
putchr(' ');
|
2019-11-20 06:08:09 +00:00
|
|
|
if (key==#RTNKEY) newlin();
|
2018-08-19 22:24:02 +00:00
|
|
|
if (key==#ESCKEY) goto exit;
|
|
|
|
}
|