Serio
use at your own risk, and at your own liability
using the routines:
functions:
: xkeypressed
returns TRUE if a character is ready on the current device, FALSE
otherwise
: xreadkey
returns first character waiting on current device -- blocks
until a character is ready
procedures:
: portengage;
engages a port for further use
: portdisengage;
disengages a port when no longer in use
: portspeed(speed);
set speed (baud rate) of port
: xwrites(s);
writes string s to current device
: xwritei(i);
writes integer i to current device
: xwriteiw(i,w);
writes integer i to current device, right-justified to width w
: xwritess(s,s);
writes strings to current device
: xwritesss(s,s,s);
writes strings to current device
: xwriteln;
writes newline to current device
: xwritelns(s);
writes string s and newline to current device
: xwritelnss(s,s);
writes strings and newline to current device
: xwritelnsss(s,s,s);
writes strings and newline to current device
: xgotoxy(x,y);
goes to column x, row y (both start at 1, top left corner)
: xwritexy(x,y,s);
goes to column x, row y, writes strings s
: xclreol;
clears to end of line
: xclreolxy(x,y);
goes to column x, row y, clears to end of line
: xclrscr;
clears entire screen, possibly going to column 1, row 1
: xreadlns(s,maxlen,keepcurrent);
reads string into s, maximum length maxlen -- will start with
current value if keepcurrent is true, will start with empty
string otherwise
: xreadlnsp(s,maxlen,keepcurrent);
reads string into s, maximum length maxlen -- will start with
current value if keepcurrent is true, will start with empty
string otherwise -- can terminate with Return or Space
: xhighvideo;
switches to high video/reverse/other color
: xlowvideo;
switches to low video/not-reverse/original color
|