Skip to content

201B HDLCfunction

Stub   MON 201B (129 decimal) · Mnemonic MHDLC · Group: Data Communication (manual section 2.13)

Available from: All programs (manual compatibility box)

Emulation source: src/handlers/mon_201B_HDLCfunction.c

Description

Performs various HDLC functions. A HDLC is a high-level data link to another computer. You may send data, receive data, and control HDLC. Data is sent as Driver Control Blocks (DCB). This monitor call is also used by X.21 to transfer DCBs between the user programs and the X.21 driver. The system uses the Logical Device Number to distinguish between HDLC and X.21.

Notes

  • Use MON 122, ReserveResource, and MON 123, Release Resource for exclusive access to a LDN.

Parameters

Name Type Direction Description
Func INTEGER In Function code: 0=send DCB to driver, 1=receive DCB from driver
DevNo INTEGER In Logical device number. Different LDNs for input and output part.
Buffer ARRAY In/Out Address of driver control block buffer.
USize INTEGER In/Out Size of the used part of the driver control block in bytes.
MSize INTEGER In For SEND: max DCB size in bytes. For RECEIVE: wait flag (1=wait, 0=continue).
Status INTEGER Out HDLC error code returned in W1: 1=LDN not reserved, 2=illegal LDN, 3=no DCB in queue, 4=no buffer, 5=illegal DCB size, 6=illegal LDN for this call, 7=max size < used size, 10=illegal function, 11=fatal error.

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 No

Examples

From the manual (OCR text, not corrected).

INTEGER SendRecDCB, LDN, Buffer, DCBusize, DCBmsize
INTEGER Buff(1024)
...
Monitor_Call('HDLCFunction', SendRecDCB, LDN, Buffer(1),
    C DCBusize, DCBmsizeXcoor


Scanned by Jonny Oddene for Sintran Data © 2020
Func   : W BLOCK 1
DevNo  : W BLOCK 1
Buffer : W BLOCK 1024 %Even byte address.
USize  : W BLOCK 1
MSize  : W BLOCK 1
Status : W BLOCK 1
HDLCfunction : EQU 37B9 + 201B


CALLG HDLCfunction, 5, Func, DevNo, Buffer, USize, MSize,
IF K GO Error
W1 =: Status

Error,
LDA (PAR      %Load address of parameter list into reg.A
MON 201       %Monitor call HDLCfunction.
JMP ERROR
JMP OK


ERROR, ...  %A-reg contains error code.
PAR, ...

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

Source

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