mirror of
https://github.com/RevCurtisP/C02.git
synced 2024-11-25 06:31:25 +00:00
37 lines
1006 B
Plaintext
37 lines
1006 B
Plaintext
/**************************************
|
|
* SIOTEST - Test/Demo module stdio.h *
|
|
**************************************/
|
|
|
|
//Specify System Header using -H option
|
|
#include <stddef.h02>
|
|
#include <stdio.h02>
|
|
#include <keydef.h02>
|
|
|
|
char key; //Key read from keyboard
|
|
char len; //Length of input output string
|
|
char str[128]; //String to read/write
|
|
|
|
main:
|
|
putsub(17, "ERROR IN PUTSUB! PRESS ANY KEY");
|
|
newlin();
|
|
key = getc(); //Wait for key press
|
|
newlin(); //Advance cursor to next line
|
|
|
|
puts("TYPE LINES, END WITH "); putln(knames.return);
|
|
puts("PRESS "); puts(knames.delete); puts(" TO DELETE, ");
|
|
puts(knames.escape); putln(" 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
|
|
}
|
|
|
|
putln("TEST COMPLETE");
|
|
|
|
done:
|
|
goto exit;
|