270B ReadDiskPage¶
Stub MON 270B (184 decimal) · Mnemonic RDPAG · Group: File Operations (manual section 2.4)
Available from: Background programs (manual compatibility box)
Emulation source: src/handlers/mon_270B_ReadDiskPage.c
Description¶
Reads one or more directory pages. Any page can be read.
- The directory must be reserved with ReserveDir.
Parameters¶
| Name | Type | Direction | Description |
|---|---|---|---|
DirIndex |
INTEGER | In | Directory index. See GetDirUserIndexes. |
Buffer |
ARRAY | Out | Buffer to receive pages (must start on even byte address). |
PageAddr |
INTEGER | In | Address of the pages on the disk (double word). |
NoOfPages |
INTEGER | In | Number of pages to transfer. Each page is 2048 bytes. |
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 | User RT and user SYSTEM | Background 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 : DirIndex, NoOfPages
INTEGER4 : PageAddr
BYTES : Buffer(0:2047)
...
ON ROUTINEERROR DO
IF ErrCode > 0 THEN ...
ENDON
Monitor_Call('ReadDiskPage', DirIndex, Buffer(0), PageAddr, NoOfPages)
INTEGER DirIndex, NoOfPages
INTEGER*4 PageAddr
INTEGER Buffer(1024)
...
Monitor_Call('ReadDiskPage', DirIndex, Buffer(1), PageAddr, NoOfPages)
IF (ErrCode .NE. 0) THEN ...
DirIndex, NoOfPages : INTEGER2;
PageAddr : LONGINT;
Buffer : ARRAY [0..63] OF RECORD...END;
...
ReadDiskPage(DirIndex, Buffer, PageAddr, NoOfPages);
IF ErrCode <> 0 THEN ...
01 DirIndex COMP.
01 NoOfPages COMP.
01 PageAddr COMP PIC S9(10).
01 Buffer.
02 array COMP OCCURS 1024 TIMES.
01 ErrCode COMP.
...
MONITOR-CALL "ReadDiskPage" USING DirIndex, Buffer, PageAddr, NoOfPages.
CALL "CbError" USING ErrCode.
IF ErrCode NOT = 0 GO ...
DirIndex : W BLOCK 1
PageAddr : W BLOCK 1
NoOfPages : W BLOCK 1
Buffer : H BLOCK 1024 % Must start on an even byte address.
ErrCode : W BLOCK 1
ReadDiskPage : EQU 37B9 + 270B
...
CALLG ReadDiskPage, 4,. DirIndex, Buffer, PageAddr, NoOfPages
IF K GO ERROR
...
ERROR : W1 =: ErrCode % ErrorCode in W1 register.
LDT DIRIX % Directory index.
LDX (BUFF % Address of buffer to receive data read.
LDA COUNT % Number of pages to transfer.
COPY SA DD
LDA (PAGNO % Address of double word with disk page address.
MON 270 % Monitor call ReadDiskPage.
JMP ERROR % Error return from monitor call.
... % Normal return.
ERROR, ... % Error number in register A.
...
DIRIX, ...
BUFF, 0
*+4000/ % Make a buffer of 2048 words.
PAGNO, ... % A double word.
...
COUNT, 2 % Read 2 pages of 1024 words.
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_270B_ReadDiskPage |
| Code lines | 8 (non-blank, non-comment lines in the file) |
Source¶
SINTRAN III Monitor Calls (ND-860228.2 EN), page 397.