Skip to content

26B GetLastByte

Stub   MON 26B (22 decimal) · Mnemonic LASTC · Group: Input and Output Monitor Calls (manual section 2.5)

Available from: All programs (manual compatibility box)

Emulation source: src/handlers/mon_26B_GetLastByte.c

Description

Gets the last character typed on a terminal. The monitor call can be used to terminate long output sequences, reading from files, etc. The program never enters the I/O wait state because of this monitor call.

  • Only user SYSTEM can execute this monitor call on a non-reserved terminal.
  • This monitor call always returns -1 if an error is encountered, not the standard SINTRAN error codes.

Parameters

Name Type Direction Description
DeviceNumber INTEGER In Logical device number of a terminal.
LastCharTyped INTEGER Out The last character typed on the terminal. Returns -1 on error.

Direction: In = the program supplies the value, Out = the call returns it, In/Out = both.

See also

InByte

Compatibility

Machines Users Programs
ND-100 and ND-500 All users All programs

The manual's compatibility box for this call, word for word.

Yes/no fields from the YAML extraction (not in the manual's words):

ND-100 ND-500 User programs RT programs System programs
Yes Yes No No No

Examples

From the manual (OCR text, not corrected).

INTEGER : DeviceNumber, LastCharTyped
...
Monitor_Call('GetLastByte', DeviceNumber, LastCharTyped)
INTEGER DeviceNumber, LastCharTyped
...
Monitor_Call('GetLastByte', DeviceNumber, LastCharTyped)
DeviceNumber, LastCharTyped : INTEGER2;
...
GetLastByte(DeviceNumber, LastCharTyped);
01 DeviceNumber COMP.
01 LastCharTyped COMP.
...
MONITOR-CALL "GetLastByte" USING DeviceNumber, LastCharTyped.
DeviceNumber : W BLOCK 1
LastCharTyped : W BLOCK 1
GetLastByte : EQU 37B9 + 26B
...
    CALLG GetLastByte, 1, DeviceNumber
    W1 := LastCharTyped %Result is returned in W1 register.
LDA (PAR %Load register A with address of parameter list.
MON 26 %Monitor call GetLastByte.
JAN ERROR %Error in parameters return -1.
STA CHAR %No errors, store byte returned.
...
ERROR, ... %Handle the error.
...
CHAR, O %Last typed character right adjusted.
PAR, DEVNO %Logical device number of a terminal.
...
DEVNO, ...

ndmonlib implementation

Stub Registered MON_STATUS_NOT_IMPLEMENTED: the handler is a stub. mon_dispatch() in src/core/mon_dispatch.c reports the call as unimplemented without calling it.

Handler mon_26B_GetLastByte
Code lines 6 (non-blank, non-comment lines in the file)

Source

SINTRAN III Monitor Calls (ND-860228.2 EN), page 255.