Skip to content

41B ReadObjectEntry

Validated   MON 41B (33 decimal) · Mnemonic ROBJE · Group: File System Operations (manual section 2.9)

Available from: All programs (manual compatibility box)

Emulation source: src/handlers/mon_41B_ReadObjectEntry.c

Description

Gets information about an opened file. An object entry describes each file. It contains the file name, the access rights, the date last opened for read and write, the size, and more. See the file system description in the SINTRAN III System Supervisor (ND-830003). You specify the file number.

  • There is one object entry for each version of a file.
  • The device number location in the object entry contains the logical device number and the unit number where the mass-storage file resides. The logical device number is placed in bit 11-0. The unit number in bit 15-12. The location contains the logical device number for peripheral files.

Parameters

Name Type Direction Description
FileNumber WORD In The file number. See OpenFile.
Buff BYTES[64] Out The 64 byte object entry buffer (output). See appendix C.

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

See also

GetObjectEntry, SetObjectEntry

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 : FileNumber
BYTES : Buff(0:63)
...
ON ROUTINEERROR DO
IF ErrCode > 0 THEN ...
ENDON
Monitor_Call('ReadObjectEntry', FileNumber, Buff(0))
INTEGER FileNumber
INTEGER Buff(32)
...
Monitor_Call('ReadObjectEntry', FileNumber, Buff(1))
IF (ErrCode .NE. 0) THEN ...
FileNumber : INTEGER2;
Buff : ARRAY [0..1] OF RECORD...END;
...
ReadObjectEntry(FileNumber, Buff);
IF ErrCode <> 0 THEN ...
01 FileNumber COMP.
01 Buff.
02 array COMP OCCURS 32 TIMES.
01 ErrCode COMP.
...
MONITOR-CALL "ReadObjectEntry" USING FileNumber, Buff.
CALL "CbError" USING ErrCode.
IF ErrCode NOT = 0 GO ...
FileNumber : W BLOCK 1
Buff : H BLOCK 40B
ErrCode : W BLOCK 1
ReadObjectEntry : EQU 37B9 + 41B
...
CALLG ReadObjectEntry, 2, FileNumber, Buff
IF K GO ERROR
...
ERROR : W1 =: ErrCode %ErrorCode in W1 register.
LDT FILNO %File number returned from earlier open.
LDA {BUFF %Address of buffer to receive object entry.
MON 41 %Monitor call ReadObjectEntry.
JMP ERROR %Error return from monitor call.
... %Normal return.
ERROR, ... %Error number in register A.
...
FILNO, ...
BUFF, 0
*+40/ %Make a 32 words large buffer.

ndmonlib implementation

Validated Registered MON_STATUS_VALIDATED in src/core/mon_registry.c: implemented, tested and working.

Handler mon_41B_ReadObjectEntry
Code lines 107 (non-blank, non-comment lines in the file)

Notes from the handler source

src/handlers/mon_41B_ReadObjectEntry.c line 181

Route by device class (SINTRAN Appendix B):
  - Character devices (0-63): Console I/O
  - Mass storage files (64-127): OpenFileTable lookup
  - Terminals (1024-1087, 1472-1535, 1536-1599): Console I/O
  - All others: Error 46 (unsupported)

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) partial
nd500x handler nd500x/src/libmon/handlers/mon_41B_ReadObjectEntry.c
Last updated 2026-07-17

Parameter notes

Name Note Verified
FileNumber Read as a 32-bit WORD on the ND-500. The value ROUTES by device class, not only to open files - see device_classes below. No

Device classes

  • Note: nd500x routes FileNumber by class before doing anything else. The class boundaries are attributed to SINTRAN Appendix B in the handler comment; the appendix itself has NOT been re-read in this pass, so treat the terminal ranges as attributed-but-unchecked.
  • Classes

    Range octal Range decimal Meaning Status
    0-77 0-63 Character devices -> synthetic terminal ObjectEntry implemented
    100-177 64-127 Open mass-storage files -> open-file-table lookup implemented
    2000-2077 1024-1087 Terminals 65-128 -> synthetic terminal ObjectEntry implemented
    2700-2777 1472-1535 Terminals 129-192 -> synthetic terminal ObjectEntry implemented
    3000-3077 1536-1599 Terminals 193-256 -> synthetic terminal ObjectEntry implemented
    all others unsupported -> error 030B (24 decimal) No such device name implemented

Object entry layout

  • Size bytes: 64
  • Note: The layout nd500x serialises. Attributed in the handler comment to SINTRAN III System Supervisor (ND-830003) Appendix C and ND-60052-04-EN NORD FILE SYSTEM section 3.1.4. IMPORTANT: the MIDDLE FIELDS ARE KNOWN TO BE BYTE-SHIFTED in our implementation (see discrepancies) - do NOT treat this table as a proven on-the-wire layout.
  • Fields

    Offset Size Name Note
    0 2 Header bit 15=Used, 14=Write, 13=Reserved, 12=Modified
    2 16 ObjectName 0x27 (apostrophe) terminated
    18 4 Type file type / extension, 0x27 terminated
    22 2 NextVersion
    24 2 PrevVersion
    26 2 AccessBits Public / Friend / Own
    28 2 FileType T/P/S/I/C/A/M/L flags
    30 2 DeviceNumber
    32 2 (reserved)
    34 2 ObjectIndex UserIndex << 8 | EntryOffset
    36 2 CurrentOpenCount
    38 2 TotalOpenCount
    40 4 DateCreated
    44 4 LastDateOpenedForRead
    48 4 LastDateOpenedForWrite
    52 4 PagesInFile
    56 4 BytesInFile stored as value-1
    60 4 FilePointer block pointer

Return contract

  • Success: K flag cleared; 64 bytes written to Buff.
  • Errors

    Code Octal Meaning
    24 030B No such device name (FileNumber in no supported class)
    90 132B No file opened with this number (mass-storage class, not open)
    111 157B Missing parameter

Verified

1. The PagesInFile field is correct.

Field Value
Evidence nd500x/docs/MON_COMPLETENESS_MATRIX.md row 41B: "page-count field correct; middle fields byte-shifted (DEFERRED, NC only reads pages)". NC is the only observed consumer and reads only the page count, which is why the shift was survivable.

2. The object-entry dates honour the pinned clock.

Field Value
Evidence With ND500X_PIN_CLOCK set, 41B ROBJE file dates are taken from the pinned instant and OVERRIDE the host stat times, so a full NC run is bit-reproducible. Commit 4fa340a.

Unverified

  • The synthetic terminal/character-device ObjectEntries are FABRICATED. The names ("TERMINAL", "INPUT", "OUTPUT", "ERROR-LOG", "DEVICE-n", "TERMINAL-n") are emulator inventions, not carved or manual values.
  • The class boundaries above are attributed to SINTRAN Appendix B in a source comment; the appendix has not been re-read to confirm them.
  • The 64-byte layout is attributed to ND-830003 Appendix C / ND-60052-04-EN 3.1.4 in a source comment; neither was re-read in this pass, and the implementation is known to disagree with itself (below).
  • The "BytesInFile stored as value-1" convention is recorded in the handler comment but not independently confirmed.
  • Access rights, version links and open counts are not meaningfully populated.

Discrepancies

1. The nd500x-emitted object entry is a faithful 64-byte SINTRAN object entry.

Field Value
Is It is NOT. The MIDDLE FIELDS ARE BYTE-SHIFTED. The defect is KNOWN and DEFERRED, because the only observed consumer (NC) reads only the page count, which lands correctly. Anyone relying on any other field must fix the layout first.
Evidence nd500x/docs/MON_COMPLETENESS_MATRIX.md row 41B, status PARTIAL.

Sources

Doc Note Commit
SINTRAN III Monitor Calls (ND-860228.2 EN) The manual page this YAML was extracted from.
SINTRAN III System Supervisor (ND-830003), Appendix C Attributed source of the 64-byte layout (not re-read in this pass).
ND-60052-04-EN NORD FILE SYSTEM, section 3.1.4 Attributed source of the object-entry structure (not re-read in this pass).
nd500x/docs/MON_COMPLETENESS_MATRIX.md Row 41B - PARTIAL, middle fields byte-shifted.
4fa340a (nd500x) - object-entry dates routed through the pinnable clock

Source

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