1
0
mirror of https://github.com/RevCurtisP/C02.git synced 2024-11-24 15:31:17 +00:00
C02/py65/testio.c02
2018-02-02 16:33:57 -05:00

31 lines
831 B
Plaintext

/**********************************************
* TESTIO - Test Library stdio.h for py65mon *
**********************************************/
#include <py65.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;