pfe-host-k12-ext
Prev? | pfe Forth Wordset List | ?Next

## Name

pfe-host-k12-ext ? HOST-K12 extensions

## Synopsis

`OPEN-TERMINAL-LOGFILE ( s-buf s-len -- ) ?=>? (` | `)`; | ?

`"FORTH"`;
?

`CLOSE-TERMINAL-LOGFILE ( -- ) ?=>? (` | `)`; | ?

`"FORTH"`;
?

`TERMINAL-EMULATION-STATE ( -- state* ) ?=>? (` | `)`; | ?

`"FORTH"`;
?

`TERMINAL-ANSWER-LINK ( -- sap#* ) ?=>? (` | `)`; | ?

`"FORTH"`;
?

`TERMINAL-OUTPUT-LINK ( -- sap#* ) ?=>? (` | `)`; | ?

`"FORTH"`;
?

`TERMINAL-INPUT-LINK ( -- sap#* ) ?=>? (` | `)`; | ?

`"FORTH"`;
?

## Description

OPEN-TERMINAL-LOGFILE ( s-buf s-len -- ) => "FORTH"

open terminal logfile named by the string-buffer all further output to the terminal window is also logged into this file. This is especially useful in embedded environments where the terminal connection is often not used or it is directed to a different location that does not easily allow to redirect the forth output to a file for further examination.

CLOSE-TERMINAL-LOGFILE ( -- ) => "FORTH"

close terminal logfile opened with `OPEN-TERMINAL-LOGFILE`

TERMINAL-EMULATION-STATE ( -- state* ) => "FORTH"

returns the address of the emulations state variable so it can be read and explicitly changed to another value from forth text. This is a very questionable thing to do as the emulation-state is actually an enumerated value, the ESE will just show question-marks setting this variable to something not understood.

TERMINAL-ANSWER-LINK ( -- sap#* ) => "FORTH"

send terminal-output as a data-message to the specified link sap. Unlike `TERMINAL-OUTPUT-LINK` the data-messages are in line-mode. The flushed characters are buffered until a non-printable character is seen. This is somewhat more useful when treating pfe as a print service and testing machine, but can not provide for interactivity.

      60 TERMINAL-ANSWER-LINK !
      ...
      TERMINAL-ANSWER-LINK OFF

TERMINAL-OUTPUT-LINK ( -- sap#* ) => "FORTH"

send terminal-output as a data-message to the specified link sap. This can be used in an embedded systems for a terminal session simulation. setting zero-sap will disable sending message-frames (the zero sap is therefore not usable for output-to-link). The startup default is zero.

      60 TERMINAL-OUTPUT-LINK !
      ...
      TERMINAL-OUTPUT-LINK OFF

TERMINAL-INPUT-LINK ( -- sap#* ) => "FORTH"

let the forth stdin-handling look for data-messages on this link too. These will be interpreted like messages that come from the interactive forth terminal. This can be used in an embedded systems for a terminal session simulation. setting zero-sap will disable interpreting these incoming data-frames as keyboard-strings (so that the zero sap is therefore not usable for an input-link!). The startup default is zero.

      60 TERMINAL-INPUT-LINK !
      ...
      TERMINAL-INPUT-LINK OFF

Prev? | Up | ?Next
pfe-help-ext? | Home | ?pfe-locals-ext