251B CopyPage¶
Stub MON 251B (169 decimal) · Mnemonic COPAG · Group: Input and Output Monitor Calls (manual section 2.5)
Available from: All programs (manual compatibility box)
Emulation source: src/handlers/mon_251B_CopyPage.c
Description¶
Copies file pages between two opened files. One of the files may be a magnetic tape or floppy disk with volume.
Notes¶
- This is a special monitor call used by the BACKUP-SYSTEM. No high level language interface exists. The use of the X and D registers is tailored for reading labels on magnetic tape.
- Copying stops at end-of-file, a non-existent page, or if a short magnetic tape record is found.
- CopyPage is only used for sequential copying, i.e. a sequence of CopyPage calls must start with page number zero.
- Files should be opened for random read or write.
- Both files must be local files.
Parameters¶
| Name | Type | Direction | Description |
|---|---|---|---|
SourceFile |
INTEGER | In | File number of source file. In the T register. Use logical device number for magnetic tape and floppy disks. |
DestFile |
INTEGER | In | File number of destination file. In the A register. Use logical device number for magnetic tapes and floppy disks. |
FirstPage |
INTEGER | In | Address of 32-bit word with page address of first page to copy. The page address is the same for the source and destination files. |
DestBuffer |
INTEGER | In | Address of buffer to receive short magnetic tape record. If source file is magnetic tape. Use -1 if you do not want the short record returned. |
FirstPageMiss |
INTEGER | Out | Page number of the missing page (double skip return). In the A&D register. Unless the source is magnetic tape, a page is missing. |
LastPageMiss |
INTEGER | Out | Last page number missing in a hole (double skip return). A set of contiguous pages can be missing. The T and X register contains the last page number missing in such a hole. This is only returned if the source is a directory. |
NoOfWord |
INTEGER | Out | Number of 16-bit integers returned (double skip return). If a short magnetic tape record is found. Only for magnetic tape as source and the D register different from -1. |
Direction: In = the program supplies the value, Out = the call returns it, In/Out = both.
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 | Yes | Yes | Yes |
Examples¶
From the manual (OCR text, not corrected).
SourceFile: W BLOCK 1
DestFile: W BLOCK 1
FirstPage: W BLOCK 1
DestBuffer: W BLOCK 1
FirstPageMiss: W BLOCK 1
LastPageMiss: W BLOCK 1
NoOfWord: W BLOCK 1
ErrCode: W BLOCK 1
CopyPage: EQU 37B9 + 251B
...
CALLG CopyPage, 7, SourceFile, DestFile, FirstPage, DestBuffer, &
FirstPageMiss, LastPageMiss, NoOfWords
IF K GO ERROR
...
ERROR : W1 := ErrCode %ErrorCode in W1 register (3 if end-of-file).
LDT FL1NO %Load file number of source file.
LDA (BUFF %Memory address of buffer to receive record.
COPY SA DD
LDA FL2NO %Load file number of destination file.
LDX (PAGE %Address of double word with page address.
MON 251 %Monitor call CopyPage.
JMP ERROR %Destination error, error number in register A.
JMP ERROR %Source error, EOF if finished, error number in A.
STD PAGNO %Normal return, store page number of missing page.
STT LAST %Store page number of last missing page.
STX LAST + 1
...
ERROR, ... %Error number in register A.
...
FL1NO, ...
FL2NO, ...
PAGE, ... %A double word.
BUFF, 0
0 %Buffer to receive a short magtape record.
PAGNO, 0
0 %A double word.
LAST, 0
0 %A double word.
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_251B_CopyPage |
| Code lines | 9 (non-blank, non-comment lines in the file) |
Source¶
SINTRAN III Monitor Calls (ND-860228.2 EN).