67B OutBufferSpace¶
In progress MON 67B (55 decimal) · Mnemonic OSIZE · Group: Input and Output Monitor Calls (manual section 2.5)
Available from: All programs (manual compatibility box)
Emulation source: src/handlers/mon_67B_OutBufferSpace.c
Description¶
Gets the number of free bytes in the output buffer (number of bytes which can be written before the program must wait). Terminals and other character devices place output in a buffer. Monitor calls like OutByte writes to this buffer.
- Use ExecutionInfo to get the logical device number for terminals. You can specify 1 for your own terminal.
- This monitor call is not available for internal devices. Use InBufferSpace and subtract this size from the inbuffer size.
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 free bytes in output buffer (output, returned in W1). |
Direction: In = the program supplies the value, Out = the call returns it, In/Out = both.
See also¶
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('OutBufferSpace', DeviceNumber, NoOfBytes)
INTEGER DeviceNumber, NoOfBytes
...
Monitor_Cal1('OutBufferSpace', DeviceNumber, NoOfBytes)
IF (ErrCode .NE. 0) THEN ...
DeviceNumber, NoOfBytes : INTEGER2;
...
OutBufferSpace(DeviceNumber, NoOfBytes);
IF ErrCode <> 0 THEN ...
01 DeviceNumber COMP.
01 NoOfBytes COMP.
01 ErrCode COMP.
...
MONITOR-CALL "OutBufferSpace" USING DeviceNumber, NoOfBytes.
CALL "CbError" USING ErrCode.
IF ErrCode NOT = 0 GO ...
DeviceNumber : W BLOCK 1
NoOfBytes : W BLOCK 1
ErrCode : W BLOCK 1
OutBufferSpace : EQU 37B9 + 67B
...
CALLG OutBufferSpace, 1, DeviceNumber
IF K GO ERROR
W1 =: NoOfBytes %Result is returned in W1 register.
...
ERROR : W1 =: ErrCode %ErrorCode in W1 register.
LDT DEVNO %Logical device number.
MON 67 %Monitor call OutBufferSpace.
JMP ERROR %Error return from monitor call.
STA COUNT %Normal return, store number of bytes.
ERROR,
... %Error number in register A.
DEVNO, ...
COUNT, 0 %Number of bytes free space in outbuffer.
ndmonlib implementation¶
In progress Registered MON_STATUS_IN_PROGRESS: partly implemented. The dispatcher calls the handler.
| Handler | mon_67B_OutBufferSpace |
| Code lines | 31 (non-blank, non-comment lines in the file) |
Notes from the handler source¶
src/handlers/mon_67B_OutBufferSpace.c line 54
For emulation, we always report a large buffer available
since we don't actually have output buffer constraints
Emulation research¶
Source
This section comes from the emulation: block of the call's YAML file in the NDInsight repo. It records what was learned while implementing the call in nd500x; its status is nd500x's, not ndmonlib's.
| Status (nd500x) | stub |
| nd500x handler | nd500x/src/libmon/handlers/mon_67B_OutBufferSpace.c |
| Last updated | 2026-07-17 |
Stub behaviour¶
RETURNS A CONSTANT - SAY SO. 67B OSIZE always answers 2048 free bytes (DEFAULT_BUFFER_SIZE) for any legal device, regardless of how much has been written. nd500x has NO output buffer at all: 2B/24B/162B/504B write straight through to the console and never block, so there is no free-space figure to report and nothing the answer could be measured against. A program that polls 67B to pace its output will see infinite space and never throttle - which is harmless here precisely because writes never block.
Parameter notes¶
1. NoOfBytes
| Field | Value |
|---|---|
| Note | Returned in W1/I1 via ctx->set_i1 AND, if a second CALLG argument is present, written to it as a 32-bit word. The manual documents the I1 return; the OUT parameter write is defensive. |
| Verified | No |
Return contract¶
- Success: K flag cleared; NoOfBytes in I1 (always 2048).
-
Errors
Code Octal Meaning 124 174B Illegal parameter (a file number was passed) 111 157B Missing parameter (no CALLG args)
Verified¶
| Claim | Evidence |
|---|---|
| File numbers are rejected. | is_mass_storage_file(device_no) -> error 124 (174B) in mon_67B_OutBufferSpace.c. |
Unverified¶
- THAT 2048 IS A PLAUSIBLE FIGURE. It is nd500x's own DEFAULT_BUFFER_SIZE, not a real SINTRAN buffer size read from anywhere. The real per-device output buffer size is not in the scanned pages.
- THE CARVE WAS NOT MINED FOR THIS ENTRY. A carve folder exists at NDInsight/tools/sintran-segment-carver/versions/L-VSX-500/re/mon-analysis/067B-OutBufferSpace/ and has NOT been read into this block. It may well carry the real buffer accounting.
- The manual says "This monitor call is not available for internal devices." nd500x does not model internal devices and so cannot reject them; it rejects only file numbers. The error code for the internal-device case is unknown.
- Error 124 (174B) for the file-number case is a CHOICE, not a read value.
- NO OBSERVED CALLER. No traced program issues 67B.
Sources¶
| Doc | Note |
|---|---|
| SINTRAN III Monitor Calls (ND-860228.2 EN) | The manual body of this YAML. |
Source¶
SINTRAN III Monitor Calls (ND-860228.2 EN), page 375.