1
0
mirror of https://github.com/RevCurtisP/C02.git synced 2024-11-30 23:50:04 +00:00
C02/py65/testio.c02

32 lines
853 B
Plaintext
Raw Normal View History

/**********************************************
* TESTIO - Test Library stdio.h for py65mon *
**********************************************/
#include <py65.h02>
2018-07-31 00:06:33 +00:00
#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;