Skip to content

77B SetStartBlock

Stub   MON 77B (63 decimal) · Mnemonic SETBL · Group: File Operations (manual section 2.4)

Available from: All programs (manual compatibility box)

Emulation source: src/handlers/mon_77B_SetStartBlock.c

Description

Sets the next block to be read or written in an opened file. You may access the first bytes in the block with the monitor calls to read and write bytes.

  • The standard block size is 512 bytes. This block size is set when the file is opened. You can change this with SetBlockSize.
  • The first block of a file is number 0.

Parameters

Name Type Direction Description
FileNumber INTEGER In File number. See OpenFile.
BlockNumber INTEGER In Block number. Next block to be read or written. First block is 0.

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

See also

SetStartByte, @SET-BLOCK-POINTER. The monitor call is identical to SetStartByte with the block number multiplied by the block size as parameter

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, BlockNumber
...
ON ROUTINEERROR DO
  IF ErrCode > 0 THEN ...
ENDON
Monitor_Call('SetStartBlock', FileNumber, BlockNumber)
INTEGER FileNumber, BlockNumber
...
Monitor Call('SetStartBlock', FileNumber, BlockNumber)
IF (ErrCode .NE. 0) THEN ...
FileNumber, BlockNumber : INTEGER2;
...
SetStartBlock(FileNumber, BlockNumber);
IF ErrCode <> 0 THEN ...
01 FileNumber COMP.
01 BlockNumber COMP.
01 ErrCode COMP.
...
MONITOR-CALL "SetStartBlock" USING FileNumber, BlockNumber.
CALL "CbError" USING ErrCode.
IF ErrCode NOT = 0 GO ...
FileNumber : W BLOCK 1
BlockNumber : W BLOCK 1
ErrCode : W BLOCK 1
SetStartBlock : EQU 3789 + 77B
...
CALLG SetStartBlock, 2, FileNumber, BlockNumber
IF K GO ERROR
...
ERROR : W1 =: ErrCode      %ErrorCode in W1 register.
LDT   FILNO    %File number returned from earlier open.
LDA   BLKNO    %Block number.
MON   77       %Monitor call SetStartBlock.
JMP   ERROR    %Error return from monitor call.
...            %Normal return.
ERROR, ...     %Error number in register A.
...
FILNO, ...
BLKNO, ...

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

Source

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