facility wordset

description

FACILITY --- The Optional Facility Word Set

Copyright (C) Tektronix, Inc. 1998 - 2001. All rights reserved.

description: 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.

FORTH

AT-XY ( col row -- )();
p4:"at-x-y";

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.

dpANS 10.6.1.0742 - standard forth word

FORTH

KEY? ( -- flag )();
p4:"key-question";

if a character is available from the keyboard, return true. The KEY word will retrieve the actual character.

dpANS 10.6.1.1755 - standard forth word

FORTH

PAGE ( .. )();
as:"page";

ordinary primitive PAGE

an executable word (no special usage info)

or wrapper call around p4_dot_clrscr

dpANS 10.6.1.2005 - standard forth word

FORTH

EKEY ( -- keycode )();
p4:"ekey";

return a keyboard event, the encoding may differ, esp. that it can contain special keys.

dpANS 10.6.2.1305 - standard forth word

FORTH
EKEY>CHAR ( keycode -- keycode false | char true )(); 
 ;
FORTH

EKEY? ( -- flag )();
p4:"ekey-question";

check if a character is available from the keyboard to be received - unlike KEY? it will not discard non-visible codes.

dpANS 10.6.2.1307 - standard forth word

FORTH

EMIT? ( -- flag )();
p4:"emit-question";

if EMIT can safely output characters without blocking the forth by waiting for an indefinite time.

dpANS 10.6.2.1325 - standard forth word

FORTH

MS ( n -- )();
p4:"ms";

wait at least the specified milliseconds (suspend the forth tasklet)

dpANS 10.6.2.1905 - standard forth word

FORTH

TIME&DATE ( .. )();
as:"time-and-date";

ordinary primitive TIME&DATE

an executable word (no special usage info)

or wrapper call around p4_time_and_date

ENVIRONMENT
FACILITY-EXT ( .. )(); 
 ;
( 1994  )  constant FACILITY-EXT

an ordinary constant (no special usage info)