Skip to content

141B DeviceControl

Stub   MON 141B (97 decimal) · Mnemonic IOSET · Group: Device Handling (manual section 2.11)

Available from: All programs (manual compatibility box)

Emulation source: src/handlers/mon_141B_DeviceControl.c

Description

Sets control information for a character device, e.g. a terminal or a printer. The control information depends on the device.

  • The device must be reserved. See ReserveResource.

Parameters

Name Type Direction Description
DeviceNo INTEGER In Logical device number. See appendix B. You cannot use 1 for your own terminal. Use ExecutionInfo to get its logical device number instead.
IOFlag INTEGER In Input or output part of the device. Use 0 for input and 1 for output.
RTProgram INTEGER In Address of RT description of reserving program. Use 0 for the calling program.
CtrlFlag INTEGER In Control flag. -2=empty TAD output buffer, -1=reset device (ASCII mode), 0=ASCII mode, 1=binary mode.
ReturnStatus INTEGER Out Return status in W1. 0 means no errors. An illegal RT description address returns -1.

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

See also

DeviceFunction, @IOSET

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 : DeviceNo, IOFlag, RTProgram, CtrlFlag, ReturnStatus
...
Monitor_Call('DeviceControl', DeviceNo, IOFlag, RTProgram, CtrlFlag, ReturnStatus)
INTEGER DeviceNo, IOFlag, RTProgram, CtrlFlag, ReturnStatus
...
Monitor_Call('DeviceControl', DeviceNo, IOFlag, RTProgram,
             CtrlFlag, ReturnStatus)
DeviceNo, IOFlag, RTProgram, CtrlFlag, Status : INTEGER2;
...
DeviceControl(DeviceNo, IOFlag, RTProgram, CtrlFlag, Status);
01 DevNo       COMP.
01 IOFlag      COMP.
01 RTProgram   COMP.
01 CtrlFlag    COMP.
01 ReturnStatus COMP.
...
MONITOR-CALL "DeviceControl" USING DevNo, IOFlag, RTProgram, CtrlFlag,
                                 ReturnStatus.
DeviceNo : W BLOCK 1
IOFlag : W BLOCK 1
RTProgram : W BLOCK 1
CtrlFlag : W BLOCK 1
ReturnStatus : W BLOCK 1
DeviceControl : EQU 37B9 + 141B
...
CALLG DeviceControl, 4, DeviceNo, IOFlag, RTProgram, CtrlFlag
W1 =: ReturnStatus %Status is returned in W1 register.
LDA (PAR %Load register A with address of parameter list.
MON 141 %Monitor call DeviceControl.
JAN ERROR %Error if register A is negative.
...
ERROR, ... %Handle the error.
...
PAR, DEVNO %Logical device number.
IOF %Input or Output flag.
PROG %RealTime (program) description.
CTRL %Control flag.
...
DEVNO, ...
IOF, ...
PROG, ...
CTRL, ...

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

Source

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