310B In8AndFlag¶
Stub MON 310B (200 decimal) · Mnemonic TBIN8 · Group: File Operations (manual section 2.4)
Available from: All programs (manual compatibility box)
Emulation source: src/handlers/mon_310B_In8AndFlag.c
Description¶
Reads 8 bytes from a device, e.g., a terminal. The monitor call applies to the defined echo and break setting. See SetEcho and SetBreak.
- Input of a break character stops the reading. The number of characters read are output. It is output as a negative number if a break character has been read. That is, bit 15 is set to 1.
- This monitor call can be used together with SetBreak and SetEcho.
- Appendix F contains an ASCII table.
Parameters¶
| Name | Type | Direction | Description |
|---|---|---|---|
DeviceNumber |
INTEGER | In | Logical device number. See appendix B. |
NoOfBytes |
INTEGER | Out | Number of bytes read. Negative (bit 15 set) if break character was read. |
Buffer |
STRING | Out | Buffer to receive the 8 bytes read. |
Direction: In = the program supplies the value, Out = the call returns it, In/Out = both.
See also¶
In8Bytes, InUpTo8Bytes, InByte, InString, InputString, 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 | No | No | No |
Examples¶
From the manual (OCR text, not corrected).
INTEGER : DeviceNumber, NoOfBytes
BYTES : Buffer(0:7)
...
ON ROUTINEERROR DO
IF ErrCode > 0 THEN ...
ENDON
Monitor_Call('In8AndFlag', DeviceNumber, NoOfBytes, Buffer)
INTEGER DeviceNumber, NoOfBytes
CHARACTER Buffer*8
...
Monitor_Call('In8AndFlag', DeviceNumber, NoOfBytes, Buffer(1:8))
IF (ErrCode .NE. 0) THEN ...
DeviceNumber, NoOfBytes : INTEGER2;
Buffer : PACKED ARRAY [0..7] OF CHAR;
...
In8AndFlag(DeviceNumber, NoOfBytes, Buffer);
IF ErrCode <> 0 THEN ...
01 DeviceNumber COMP.
01 NoOfBytes COMP.
01 Buffer PIC X(8).
01 ErrCode COMP.
...
MONITOR-CALL "In8AndFlag" USING DeviceNumber, NoOfBytes, Buffer.
CALL "CbError" USING ErrCode.
IF ErrCode NOT = 0 GO ...
DeviceNumber : W BLOCK 1
NoOfBytes : W BLOCK 1
Buffer : STRING 8
In8AndFlag : EQU 37B9 + 310B
...
CALLG In8AndFlag, 3, DeviceNumber, NoOfBytes, Buffer
IF K GO Error,
...
Error, ...
LDT DEVNO %Logical device number.
MON 310 %Monitor call In8AndFlag.
JMP ERROR %Error return.
STD BYTES %Store first 4 bytes read.
COPY SL DA
STA BYTES+2 %Store next 2 bytes read.
STX BYTES+3 %Store last 2 bytes read.
STT COUNT %Store number of bytes read.
...
ERROR, ... %Error handling.
...
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_310B_In8AndFlag |
| Code lines | 6 (non-blank, non-comment lines in the file) |
Source¶
SINTRAN III Monitor Calls (ND-860228.2 EN), page 311.