Skip to content

21B InUpTo8Bytes

Stub   MON 21B (17 decimal) · Mnemonic M8INB · Group: Input and Output Monitor Calls (manual section 2.5)

Available from: All programs (manual compatibility box)

Emulation source: src/handlers/mon_21B_InUpTo8Bytes.c

Description

See also In8Bytes, InByte, InString, In4x2Bytes, and Out8Bytes.

Parameters

Name Type Direction Description
DeviceNumber INTEGER2 In Logical device number. See appendix B.
NoOfBytes INTEGER2 Out Number of bytes read (output). For word-oriented devices, returns word count.
InData BYTES[8] Out The 8 bytes of input data (output).

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

See also

In8Bytes, InByte, InString, In4x2Bytes, and Out8Bytes

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 Yes Yes No

Examples

From the manual (OCR text, not corrected).

INTEGER : DeviceNumber, NoOfBytes
BYTES : InData(0:7)
...
ON ROUTINEERROR DO
    IF ErrCode > 0 THEN ...
ENDON
Monitor_Call('InUpTo8Bytes', DeviceNumber, NoOfBytes, InData)
INTEGER  DeviceNumber, NoOfBytes
CHARACTER InData*8
...
Monitor_Call('InUpTo8Bytes', DeviceNumber, NoOfBytes, InData(1:8))
IF (ErrCode .NE. 0) THEN ...
DeviceNumber, NoOfBytes : INTEGER2;
InData : RECORD...END;
...
InUpTo8Bytes(DeviceNumber, NoOfBytes, InData);
IF ErrCode <> 0 THEN ...
01 DeviceNumber  COMP.
01 NoOfBytes     COMP.
01 InData        PIC X(8).
01 ErrCode       COMP.
...
MONITOR-CALL "InUpTo8Bytes" USING DeviceNumber, NoOfBytes, InData.
CALL "CbError" USING ErrCode.
IF ErrCode NOT = 0 GO ...
DeviceNumber : W BLOCK 1
NoOfBytes : W BLOCK 1
InData : STRING 8
ErrCode : W BLOCK 1
InUpTo8Bytes : EQU 37B9 + 21B
...
&nbsp;&nbsp;&nbsp;&nbsp;CALLG InUpTo8Bytes, 3, DeviceNumber, NoOfBytes, InData
&nbsp;&nbsp;&nbsp;&nbsp;IF K GO ERROR
...
ERROR : W1 =: ErrCode &nbsp;&nbsp;&nbsp;&nbsp;%ErrorCode in W1 register.
LDT DEVNO &nbsp;&nbsp;&nbsp;&nbsp;%Logical device number.
MON 21 &nbsp;&nbsp;&nbsp;&nbsp;%Monitor call InUpTo8Bytes.
JMP ERROR &nbsp;&nbsp;&nbsp;&nbsp;%Error return from monitor call.
STD BYTES &nbsp;&nbsp;&nbsp;&nbsp;%Normal return, store first 4 bytes read.
COPY SL DA
STA BYTES+2 &nbsp;&nbsp;&nbsp;&nbsp;%Store next 2 bytes read.
STX BYTES+3 &nbsp;&nbsp;&nbsp;&nbsp;%Store last 2 bytes read.
STT COUNT &nbsp;&nbsp;&nbsp;&nbsp;%Store number of bytes (or words) read.
...
ERROR, ... &nbsp;&nbsp;&nbsp;&nbsp;%Error number in register A.
...
DEVNO, ...
COUNT, 0
BYTES, 0
0
0
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_21B_InUpTo8Bytes
Code lines 6 (non-blank, non-comment lines in the file)

Source

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