io

SPACE . CR EMIT U. TYPE EXPECT SPAN KEY

Library notes














SPACE ( -- )
Output space to current output file.
. ( n -- )
Output signed integer, a '-' sign is written before the digit if it is negative.
CR ( -- )
Outputs newline character, which implies a output buffer flush.
EMIT ( c -- )
Outputs 'c' as a character to the output file.
U. ( u -- )
Output 'u' as an unsigned integer.
TYPE ( a # -- )
Output the string at addr 'a' with length '#' to the output file.
EXPECT ( a # -- )
Read '#' bytes to addr 'a' from STDIN.
SPAN
Address of variable containing the number of bytes read by EXPECT .
KEY ( -- c )
Read a key from STDIN and push key`s ascii value on stack.
Library notes
The io lib implements all old style forth words for input/output.
It will slowly be rewritten to fit other libraries, however atleast the output words will remain the same in the future.