Skip to content

271B WriteDiskPage

Stub   MON 271B (185 decimal) · Mnemonic WDPAG · Group: File Operations (manual section 2.4)

Available from: Background programs (manual compatibility box)

Emulation source: src/handlers/mon_271B_WriteDiskPage.c

Description

Writes to one or more pages in a directory. Any page can be written to.

  • The directory must be reserved with ReseveDir.

Parameters

Name Type Direction Description
DirIndex INTEGER In Directory index. See GetDirUserIndexes.
Buffer ARRAY In Buffer with pages to transfer (must start on even byte address).
PageAddr INTEGER In Address of the destination 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

ReadDiskPage

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('WriteDiskPage', DirIndex, Buffer(0), PageAddr, NoOfPages)
INTEGER DirIndex, NoOfPages
INTEGER*4 PageAddr
INTEGER Buffer(1024)
...
Monitor__Call('WriteDiskPage', DirIndex, Buffer(1), PageAddr, NoOfPages)
IF (ErrCode .NE. 0) THEN ...
DirIndex, NoOfPages : INTEGER2;
Buffer : ARRAY [0..63] OF RECORD...END;
PageAddr : LONGINT;
...
WriteDiskPage(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 "WriteDiskPage" 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 : W BLOCK 1024 %Must start on an even byte address.
ErrCode : W BLOCK 1
WriteDiskPage : EQU 37B9 + 271B
...
CALLG WriteDiskPage, 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 containing data to be written.
LDA PAGES %Number of pages to transfer.
COPY SA DD
LDA (PAGNO %Address of double word with disk page address.
MON 271 %Monitor call WriteDiskPage.
JMP ERROR %Error return from monitor call.
... %Normal return.
... %Error number in register A.
...
DIRIX, ...
BUFF, 0
*+4000/ %Make a buffer of 2048 words, 2 pages.
PAGNO, ... %A double word.
... %
PAGES, 2 %Transfer 2 pages.

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_271B_WriteDiskPage
Code lines 9 (non-blank, non-comment lines in the file)

Source

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