1
0
mirror of https://github.com/RevCurtisP/C02.git synced 2024-11-28 10:51:14 +00:00
C02/py65/testio.c02
2018-07-30 20:06:33 -04:00

32 lines
853 B
Plaintext

/**********************************************
* TESTIO - Test Library stdio.h for py65mon *
**********************************************/
#include <py65.h02>
#include <stddef.h02>
#include <stdio.h02>
char key; //Key read from keyboard
char len; //Length of input output string
char str[128]; //String to read/write
main:
putln("Press any key to continue");
key = getc(); //Wait for key press
newlin(); //Advance cursor to next line
putln("Type lines followed by carriage-return");
putln("press Escape key to end");
while () {
putc('>');
len = gets(&str); //Read string from keybaord
if (len == $FF) //If entry was aborted
break ; // return to monitor
puts("You typed: "); //Print without newline
putln(&str); //print with newline
}
done:
goto exit;