OpenBoot 3.x Command Reference Manual

Controlling Text Input

Table I-26 Controlling Text Input

Command  

Stack Diagram 

Description 

( ccc )

( -- ) 

Begin a comment. 

\ rest-of-line

( -- ) 

Skip the rest of the line. 

ascii ccc

( -- char ) 

Get numerical value of first ASCII character of next word. 

accept

( addr len1 -- len2 ) 

Get a line of edited input from the console input device; store at addr.len1 is the maximum allowed length. len2 is the actual length received.

expect

( addr len -- ) 

Get and display a line of input from the console; store at addr. (Recommend using accept instead.)

key

( -- char ) 

Read a character from the console input device. 

key?

( -- flag ) 

True if a key has been typed on the console input device. 

parse

( char -- str len ) 

Parse text from the input buffer delimited by char. 

parse-word

( -- str len ) 

Skip leading spaces and parse text from the input buffer delimited by white space. 

safe-parse-word

( -- str len ) 

Similar to parse-word but intended for use in cases where the null string as input is indicative of an error.

word

( char -- pstr ) 

Collect a string delimited by char from the input buffer and place it as a packed string in memory at pstr. (Recommend using parse instead.)