RTIO is a simple low-level interface for I/O used by the
runtime. None of its routines do any locking or require
any memory allocation. Output is buffered internally
until Flush
is called or the internal buffer overflows.
Clients beware, this interface may change at any time.
INTERFACERTIO ; PROCEDURE PutChar (c: CHAR);
Write c
.
PROCEDURE PutChars (a: ADDRESS; n: INTEGER);
Write characters a[0..n-1]
.
PROCEDURE PutString (s: ADDRESS);
Write the null terminated string beginning at s
.
PROCEDURE PutText (t: TEXT);
Write textt
on filef
.
PROCEDURE PutInt (i: INTEGER; width := 0);
Convert integeri
to decimal digits and write it right-justified in a field ofwidth
characters.
PROCEDURE PutHex (i: INTEGER; width := 0);
Convert unsigned integeri
to hexidecimal digits with a0x
prefix and write it right-justified in a field ofwidth
characters.
PROCEDURE PutAddr (a: ADDRESS; width := 0);
== PutHex (LOOPHOLE (a, INTEGER), width)
PROCEDURE Flush ();
Flush any buffered characters to the operating system.
END RTIO.