2018-08-19 00:48:45 +00:00
|
|
|
/****************************************************
|
|
|
|
* ECHO - Test/Demo program for C02 Standard Header *
|
|
|
|
* Echos typed keys to screen *
|
|
|
|
* RETURN/ENTER key Moves to New Line *
|
|
|
|
* BACKSPACE/DELETE key Deletes to Left *
|
|
|
|
* ESCAPE/STOP key Ends Program *
|
|
|
|
****************************************************/
|
|
|
|
|
|
|
|
//Specify System Header using -H option
|
|
|
|
|
|
|
|
char key; //Key value
|
|
|
|
|
|
|
|
main:
|
|
|
|
while() {
|
2018-09-17 00:53:34 +00:00
|
|
|
key = getchr();
|
2018-08-19 00:48:45 +00:00
|
|
|
select (key) {
|
|
|
|
case #DELKEY: delchr();
|
|
|
|
case #RTNKEY: newlin();
|
|
|
|
case #ESCKEY: goto exit;
|
2018-09-17 00:53:34 +00:00
|
|
|
default: putchr(key);
|
2018-08-19 00:48:45 +00:00
|
|
|
}
|
|
|
|
}
|