Skip to content

333B DMAFunction

Stub   MON 333B (219 decimal) · Mnemonic UDMA · Group: Device Handling (manual section 2.11)

Available from: not known - no compatibility box captured from the manual

Emulation source: src/handlers/mon_333B_DMAFunction.c

Description

Various DMA functions for Direct Memory Access operations.

Function codes: - 1: Receive DMA data (input: length in bytes, output: actual length) - 2: Send DMA data (input: length in bytes) - 3: Receive DMA data with No Wait (input: length in bytes) - 4: Send DMA data with No Wait (input: length in bytes) - 7: Test mode (output: status) - 20: Read DMA status (output: status) - 21: Clear DMA device (output: status) - 24: Read last status - 54-57: Use programmed input/output devices

Output status bits: - Bits 0:7 and bit 15: Copied from the device status word - Bits 8:14: User status lines - Bit 16: DMA interrupt has occurred - Bit 17: Timeout

Parameters

Name Type Direction Description
DeviceNo INTEGER2 In Logical device number of a DMA channel.
FuncCode INTEGER2 In Function code. See function codes in description.
DataAddress ARRAY In/Out Memory address of data to send or receive for function code 0:3. Function codes 54:57 use programmed input/output devices and this parameter contains the logical device number of the device. Ignored for other function codes.
InPara INTEGER4 In Input parameter. Function dependent.
OutPara INTEGER4 Out Output parameter. Function dependent. Some functions return a status value.
ErrCode INTEGER2 Out Standard Error Code. See appendix A.

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

Compatibility

ND-100 ND-500 User programs RT programs System programs
Yes Yes Yes Yes Yes

From the YAML extraction; this call's page in the manual had no compatibility box that was captured.

Examples

From the manual (OCR text, not corrected).

INTEGER : DeviceNo, FuncCode
INTEGER4 : InPar, OutPar
BYTES : DataAdr(0:511)
...
ON ROUTINEERROR DO
    IF ErrCode > 0 THEN ...
ENDON
Monitor_Call('DMAFunction', DeviceNo, FuncCode, DataAdr(0), InPar, OutPar)
INTEGER DeviceNo, FuncCode
INTEGER*4 InPara, OutPara
INTEGER DataAddress(256)
Monitor_Call('DMAFunction', DeviceNo, FuncCode,
C DataAddress(1), InPara, OutPara)
IF (ErrCode .NE. 0) THEN...
DeviceNo, FuncCode : INTEGER2; InPara, OutPara : LONGINT;
DataAddress : ARRAY [0..16] OF RECORD...END;
...
DMAFunction(DeviceNo, FuncCode, DataAddress, InPara, OutPara);
IF ErrCode <> 0 THEN...
01 DeviceNo COMP. 01 FuncCode COMP.
01 InPara COMP PIC S9(10).
01 OutPara COMP PIC S9(10).
01 DataAddress.
02 array COMP OCCURS 256 TIMES.
01 ErrCode COMP.
...
MONITOR-CALL "DMAFunction" USING DeviceNo, FuncCode, DataAddress,
InPara, OutPara.
CALL "CbError" USING ErrCode.
IF ErrCode NOT = 0 GO...
DeviceNo   : W BLOCK 1
FuncCode   : W BLOCK 1
InPara     : W BLOCK 1    %Length must be an even number of bytes.
OutPara    : W BLOCK 1
Buffer     : W BLOCK 256
ErrCode    : W BLOCK 1
DMAFunction: EQU 37B9 + 333B
...
CALLG DMAFunction, 5, FuncCode, Buffer, DeviceNo, InPara, OutPara
IF K GO ERROR
...
ERROR : W1 =: ErrCode         %ErrorCode in W1 register.
LDT LDN                   %Load register T with the logical device number.
LDA (PAR                  %Load register A with address of parameter list.
MON 333                   %Monitor call DMAFunction.
STA STAT
...
STAT, 0
PAR, FUNC                %Parameter list.
ADR
IPAR
OPAR

FUNC, ...
ADR, ...                 %Address in your memory area.
IPAR, 0:0                %A 32-bit input parameter.
OPAR, 0:0                %A 32-bit output parameter.

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

Source

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