mirror of
https://github.com/RevCurtisP/C02.git
synced 2024-11-18 21:07:28 +00:00
31 lines
831 B
Plaintext
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;
|