Skip to content

66B InBufferSpace

Stub   MON 66B (54 decimal) · Mnemonic ISIZE · Group: Input and Output Monitor Calls (manual section 2.5)

Available from: All programs (manual compatibility box)

Emulation source: src/handlers/mon_66B_InBufferSpace.c

Description

Gets the current number of bytes in the input buffer. Terminals and other character devices place input in a buffer. All input monitor calls read from this buffer.

  • Use ExecutionInfo to get the logical device number for terminals. You can specify 1 for your own terminal.
  • The buffer size depends on the device.

Parameters

Name Type Direction Description
DeviceNumber INTEGER2 In Logical device number. See appendix B. Use 1 for your own terminal.
NoOfBytes INTEGER2 Out Number of bytes in the input buffer (output, returned in W1).

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

See also

InBufferState, ClearInBuffer, OutBufferSpace

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, NoOfBytes
...
ON ROUTINEERROR DO
 IF ErrCode > 0 THEN ...
ENDON
Monitor_Call('InBufferSpace', DeviceNumber, NoOfBytes)
INTEGER DeviceNumber, NoOfBytes
...
Monitor Call1('InBufferSpace', DeviceNumber, NoOfBytes)
IF (ErrCode .NE. 0) THEN ...
DeviceNumber, NoOfBytes : INTEGER2;
...
BytesInBuffer(DeviceNumber, NoOfBytes);   [Note routine name.]
IF ErrCode <> 0 THEN ...
01 DeviceNumber COMP.
01 NoOfBytes COMP.
01 ErrCode COMP.
...
MONITOR-CALL "InBufferSpace" USING DeviceNumber, NoOfBytes.
CALL "CbError" USING ErrCode.
IF ErrCode NOT = 0 GO ...
DeviceNumber : W BLOCK 1
NoOfBytes : W BLOCK 1
ErrCode : W BLOCK 1
InBufferSpace : EQU 3789 + 66B
...
CALLG InBufferSpace, i, DeviceNumber
IF K GO ERROR
W1 =: NoOfBytes %Result is returned in W1 register.
...
ERROR : W1 =: ErrCode %ErrorCode in W1 register.
LDA DEVNO %Logical device number.
MON 66 %Monitor call InBufferSpace.
JMP ERROR %Error return from monitor call.
STA COUNT %Normal return, store number of bytes in inbuffer.
...
ERROR, ... %Error number in register A.
...
DEVNO, ...
COUNT, 0

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_66B_InBufferSpace
Code lines 6 (non-blank, non-comment lines in the file)

Source

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