• Keine Ergebnisse gefunden

This library contains macros and symbolic pointer declarations. To access the library, use the Macro Assembler Pseudo-Op INCLUDE to the file UBUTIL.LIB, which will include it directly in the source code. The library will permit customer written code to service attached UNIBUS-compatible devices in a ·customized manner.

USETUP: Set up Parallel I/O entry points.

Format:

Where:

Purpose:

USETUP TABLE,UCERR

TABLE

=

Tw((lve byte table of entry points in the following format:

Bytes 0- 3: offset/segment of Interrupt service routine.

Bytes 4- 7: offset/segment of Set Start Register service routine.

Bytes 8-11: offset/segment of Attention Sent service routine.

UCERR

=

OPTIONAL Unit Check error flag.

This macro is used to set up the customer entry points for device interrupts, Set Start Register function calls, and attention-sent events.

Once the linkage is set up, execution will return to the caller. The DS register must point to the segment of the table before calling the macro. This macro should only be called once, from an initialization routine. Any table entry that is zero implies that no user entry of that type exists.

An optional Unit Check error flag, containing any value, should be specified if it is desired to be able to send a Device End/Unit Check upon exiting a Set Start Register service routine instead of the default Device End. The Device End/Unit Check would be sent if there was an error in Set Start Register code processing, which would be indicated by placing a X'4321' in the AX register before exiting the Set Start Register service routine with a RET (far).

Remarks: The linkage to the supplied control code is via interrupt X'90' and is handled by the customer interface portion of the Dispatcher. The DX register is used by the macro.

WUB: Write to a UNIBUS-compatible device register.

Format:

Where:

Purpose:

WUB ADDR,DATA

ADDR = Address of device register to write.

DATA

=

1 word of data to write.

This macro is used to write one word of data to a UNIBUS compatible device register. Before calling the macro, the ES register must point to segment X'7000', there must be no device interrupts pending, and NPR's should be turned off by writing to Parallel I/O control register (UBCTL) in segment X'5000'.

Remarks: The macro polls the Parallel I/O status register to determine if a successful write has been performed. If a device interrupt is pending or the device register cannot be written to, the macro will loop forever.

Once a successful write has been performed, the UBRDDA T register is read to reset the register. The AX register is used by the macro.

RUB: Read from a UNIBUS-compatible device register.

Format: RUB ADDR

Where: ADDR

=

Address of device register to read.

Purpose: This macro is used to read one word of data from a UNIBUS compatible device register into the AX register. Before calling the macro, the ES register must point to segment X'7000', there must be no device interrupts pending, and NPR's should be turned off by writing to Parallel I/O control register (UBCTL) in segment X'5000'.

Remarks: The macro polls the Parallel I/O status register to determine if a successful read has been performed. If a device interrupt is pending or the device register cannot be read, the macro will loop forever. Once a successful read has been performed, the UBRDDAT register is read to reset the register.

A set of symbolic pointer declarations provides symbolic pointers to Parallel I/O interface address space, including real memory and I/O device space as well as status and control registers.

The file UBUTIL.LIB contains the following source code:

UBUTIL : Parallel I/O utility Library

USETUP MACRO TABLE,UCERR ; PARALLEL I/O SETUP MACRO

WUB

TEST FOR PARM EXISTENCE (GENERATE ASSEMBLY ERROR) IF1

IFB <TABLE> ;IF NO TABLE, DISPLAY ERROR

%OUT USETUP MACRO USED MISSING PARAMETER ENDIF

ENDIF PUSH MOV TEST FOR

IFNB MOV ENDIF

CX

CX,O ;SET UNIT CHECK FLAG OFF OPTIONAL UNIT CHECK PARAMETER

<UCERR>

CX,4321H ;SET UNIT CHECK FLAG ON LOAD ENTRY POINT TABLE

LEA DX,TABLE ;POINT DS:DX TO ENT PT TABLE

;TELL DACU CODE USER ENT PTS INT 90H

POP CX ENDM

MACRO ADDR,DATA ;WT DATA TO DEVICE REG MACRO

%OUT WUB MACRO USED MISSING SECOND PARAMETER LBW: TEST ES:UBSTAT,0400H iREADY?

JZ LBW iWILL LOOP FOREVER IF NO RDY LBR: TEST ES:UBSTAT,0400H iREADY?

JZ LBR iWILL LOOP FOREVER IF NO RDY

Serial I/O Utility Library

05000H

iPARALLEL I/O BUFFER SEGMENT iPARALLEL I/O CONTROL REG iPARALLEL I/O STATUS REGI iPARALLEL I/O INTR VECTOR iPARALLEL I/O READ REGISTER

When one of the serial ports is initialized from the host system, application control is done completely from the host system. If the customer wishes to write

specialized DACU-resident code, that code must provide all Serial I/O

initialization and interrupt servicing for both devices. This libnt'rycontains macro and symbolic pointer definitions which will assist in accomplishing those functions.

To access the library, use the Macro Assembler Pseudo-Op INCLUDE to the file SERUTIL.LIB, which will include it directly in source code. Refer to

documentation on the Intel 8274 Multi-Protocol Serial Controller chip (MPSC) for information on specialized Serial I/O programming.

SSETUP: Set up Serial I/O entry points.

Format: SSETUP TABLE

Where: TABLE

=

Twelve byte table of entry points in the following format:

Bytes 0- 3: offset/segment of Interrupt service routine.

Bytes 4- 7: offset/segment of Set Start Register service routine.

Bytes 8-11: offset/segment of Attention Sent service routine.

Purpose: This macro is used to set up the customer entry points for Serial I/O device interrupts, Set Start Register function calls, and attention-sent events. Once the linkage is set up, execution will return to the caller.

The DS register must point to the segment of the table before calling the macro. This macro should only be' called once, from an

initialization routine. Any table entry that is zero implies that no user exit routine of that type exists.

Remarks: The linkage to the supplied control code is via interrupt X'96' and is handled by the customer interface portion of the Dispatcher. The DX register is used by the macro.

A set of symbolic pointer declarations provides symbolic pointers to Serial I/O address space, as well as status and control registers.

The file SERUTIL.LIB contains the following source code:

SERUTIL : Serial I/O utility Library

;SERIAL BUFFER SEGMENT

; CHANNEL A DATA, READ

i

The following code is an example of a customer initialization routine for a UNIBUS-compatible device, using the Parallel I/O Utility and General Usage Macro Libraries:

.SALL·

PAGE ,132

TITLE USER User Initialization Program

EXTRN START: FAR iSET START REG SVC ROUTINE iINTERRUPT ENTRY POINT

;SET START REG ENTRY POINT iATTENTION SENT ENTRY POINT iBATCH ROUTINE ENTRY POINT

SLEEP iEXIT INITIALIZATION (SLEEP)

iDONE FOR NOW. WAIT FOR CALL FROM DACU CODE

i

i******** SET START REGISTER ENTRY POINT

********