"Facility + extensions"
facility
There are the following primitive words for input and output:
KEY
waits for a character typed on the keyboard and returns
that character, but KEY
does not return non-character
input events like function keys pressed - use EKEY
for
a more complete keyboard query.
Furthermore, KEY?
returns true if a key is available for
reading using KEY
(function key presses are not detected
but discarded).
EMIT
will display the character at the current cursor
position, control characters take effect depending on the
system. TYPE
displays all the chars in the given string
buffer.
To get the current cursor position, use AT-XY
.
[ANS]
move the cursor position to the given row and column
of the screen. If the output device is not a terminal
this will have no effect but can still send an
escape sequence.
|
facility ordinary primitive
if a character is available from the keyboard, return true.
The KEY word will retrieve the actual character.
|
facility ordinary primitive
facility ordinary primitive
return a keyboard event, the encoding may differ, esp.
that it can contain special keys.
|
facility ordinary primitive
facility ordinary primitive
check if a character is available from the keyboard
to be received - unlike KEY? it will not discard
non-visible codes.
|
facility ordinary primitive
if EMIT can safely output characters without
blocking the forth by waiting for an indefinite time.
|
facility ordinary primitive
wait at least the specified milliseconds
(suspend the forth tasklet)
|
facility ordinary primitive
[ANS] TIME&DATE
no special info, see general notes
facility ordinary primitive
ENVIRONMENT
ENVIRONMENT FACILITY-EXT
no special info, see general notes
facility ordinary constant