Trailing-Edge
-
PDP-10 Archives
-
BB-W661A-BM_1983
-
tools/macro-reference-guide.mem
There is 1 other file named macro-reference-guide.mem in the archive. Click here to see a list.
TOPS-20 PSI
MACRO-20 Gateway Access Routines
Reference Guide
This document provides a quick reference to the MACRO-20 Gateway Access
Routine calling sequences and argument block layouts.
The MACRO-20 Gateway Access Routines are:
X%AIC Accept Incoming Call
X%CIM Confirm Interrupt Message
X%CSC Clear Switched Circuit
X%ISC Initiate Switched Circuit
X%NCS No Communication Seen
X%OPC Open Permanent Circuit
X%RAD Read Accept Data
X%RCD Read Clear Data
X%RDM Read Data Message
X%RIC Read Incoming Call
X%RIM Read Interrupt Message
X%RPS Read Port Status
X%RRD Read Reset Data
X%RVC Reset Virtual Circuit
X%SDM Send Data Message
X%SIM Send Interrupt Message
X%TPA Terminate Port Access
X%WIC Wait Incoming Call
The standard calling sequence is:
o A MOVEI with AC1 and a pointer to an argument block.
o A PUSHJ 17 with the call.
o Return in the +1 location.
MACRO-20 Gateway Access Routines Page 1
X%AIC
Accept Incoming Call
MOVEI AC1,ARGBLK
PUSHJ 17,X%AIC
Accepts in ARGBLK
+-------------------------------------------------------+
ARGBLK+0 | Port number |
+-------------------------------------------------------+
ARGBLK+1 | |
+-------------------------------------------------------+
ARGBLK+2 | ASCIZ byte pointer to user group name |
+---------------------------+---------------------------+
ARGBLK+3 | Facilities length | Facilities buffer address |
+---------------------------+---------------------------+
ARGBLK+4 | User data length | User data buffer address |
+---------------------------+---------------------------+
0 1 1 3
7 8 5
Returns in ARGBLK
+-------------------------------------------------------+
ARGBLK+0 | |
+-------------------------------------------------------+
ARGBLK+1 | Return code |
+-------------------------------------------------------+
ARGBLK+2 | |
+-------------------------------------------------------+
ARGBLK+3 | |
+-------------------------------------------------------+
ARGBLK+4 | |
+-------------------------------------------------------+
0 3
5
MACRO-20 Gateway Access Routines Page 2
X%CIM
Confirm Interrupt Message
MOVEI AC1,ARGBLK
PUSHJ 17,X%CIM
Accepts in ARGBLK
+-------------------------------------------------------+
ARGBLK+0 | Port number |
+-------------------------------------------------------+
ARGBLK+1 | |
+-------------------------------------------------------+
0 3
5
Returns in ARGBLK
+-------------------------------------------------------+
ARGBLK+0 | |
+-------------------------------------------------------+
ARGBLK+1 | Return code |
+-------------------------------------------------------+
0 3
5
MACRO-20 Gateway Access Routines Page 3
X%CSC
Clear Switched Circuit
MOVEI AC1,ARGBLK
PUSHJ 17,X%CSC
Accepts in ARGBLK
+-------------------------------------------------------+
ARGBLK+0 | Port number |
+-------------------------------------------------------+
ARGBLK+1 | |
+------------------------------------------+------------+
ARGBLK+2 | | Diagnostic |
+---------------------------+--------------+------------+
ARGBLK+3 | Facilities length | Facilities buffer address |
+---------------------------+---------------------------+
ARGBLK+4 | User data length | User data buffer address |
+---------------------------+---------------------------+
0 1 1 2 3
7 8 8 5
Returns in ARGBLK
+-------------------------------------------------------+
ARGBLK+0 | |
+-------------------------------------------------------+
ARGBLK+1 | Return code |
+-------------------------------------------------------+
ARGBLK+2 | |
+-------------------------------------------------------+
ARGBLK+3 | |
+-------------------------------------------------------+
ARGBLK+4 | |
+-------------------------------------------------------+
0 3
5
MACRO-20 Gateway Access Routines Page 4
X%ISC
Initiate Switched Circuit
MOVEI AC1,ARGBLK
PUSHJ 17,X%ISC
Accepts in ARGBLK
+---------------------------+---------------------------+
ARGBLK+0 | Interrupt channel | Workspace buffer address |
+---------------------------+---------------------------+
ARGBLK+1 | |
+-------------------------------------------------------+
ARGBLK+2 | ASCIZ byte pointer to network name |
+-------------------------------------------------------+
ARGBLK+3 | ASCIZ byte pointer to network access password |
+-------------------------------------------------------+
ARGBLK+4 | ASCIZ byte pointer to destination DTE address |
+-------------------------------------------------------+
ARGBLK+5 | ASCIZ byte pointer to source DTE subaddress |
+-------------------------------------------------------+
ARGBLK+6 | ASCIZ byte pointer to user group name |
+---------------------------+---------------------------+
ARGBLK+7 | Facilities length | Facilities buffer address |
+---------------------------+---------------------------+
ARGBLK+10 | User data length | User data buffer address |
+---------------------------+---------------------------+
0 1 1 3
7 8 5
Returns in ARGBLK
+-------------------------------------------------------+
ARGBLK+0 | Port number |
+-------------------------------------------------------+
ARGBLK+1 | Return code |
+-------------------------------------------------------+
ARGBLK+2 | |
+-------------------------------------------------------+
ARGBLK+3 | |
+-------------------------------------------------------+
ARGBLK+4 | |
+-------------------------------------------------------+
ARGBLK+5 | |
+-------------------------------------------------------+
ARGBLK+6 | |
+-------------------------------------------------------+
ARGBLK+7 | |
+-------------------------------------------------------+
ARGBLK+10 | |
+-------------------------------------------------------+
0 3
5
MACRO-20 Gateway Access Routines Page 5
X%NCS
No Communication Seen
MOVEI AC1,ARGBLK
PUSHJ 17,X%NCS
Accepts in ARGBLK
+-------------------------------------------------------+
ARGBLK+0 | Port number |
+-------------------------------------------------------+
ARGBLK+1 | |
+-------------------------------------------------------+
0 3
5
Returns in ARGBLK
+-------------------------------------------------------+
ARGBLK+0 | |
+-------------------------------------------------------+
ARGBLK+1 | Return code |
+-------------------------------------------------------+
0 3
5
MACRO-20 Gateway Access Routines Page 6
X%OPC
Open Permanent Circuit
MOVEI AC1,ARGBLK
PUSHJ 17,X%OPC
Accepts in ARGBLK
+---------------------------+---------------------------+
ARGBLK+0 | Interrupt channel | Workspace buffer address |
+---------------------------+---------------------------+
ARGBLK+1 | |
+-------------------------------------------------------+
ARGBLK+2 | ASCIZ byte pointer to network name |
+-------------------------------------------------------+
ARGBLK+3 | ASCIZ byte pointer to network access password |
+-------------------------------------------------------+
ARGBLK+4 | ASCIZ byte pointer to permanent circuit name |
+-------------------------------------------------------+
0 1 1 3
7 8 5
Returns in ARGBLK
+-------------------------------------------------------+
ARGBLK+0 | Port number |
+-------------------------------------------------------+
ARGBLK+1 | Return code |
+-------------------------------------------------------+
ARGBLK+2 | |
+-------------------------------------------------------+
ARGBLK+3 | |
+-------------------------------------------------------+
ARGBLK+4 | |
+-------------------------------------------------------+
0 3
5
MACRO-20 Gateway Access Routines Page 7
X%RAD
Read Accept Data
MOVEI AC1,ARGBLK
PUSHJ 17,X%RAD
Accepts in ARGBLK
+-------------------------------------------------------+
ARGBLK+0 | Port number |
+-------------------------------------------------------+
ARGBLK+1 | |
+-------------------------------------------------------+
ARGBLK+2 | Byte pointer to destination for ASCIZ user group name |
+---------------------------+---------------------------+
ARGBLK+3 | Facilities buffer length | Facilities buffer address |
+---------------------------+---------------------------+
ARGBLK+4 | User data buffer length | User data buffer address |
+---------------------------+---------------------------+
0 1 1 3
7 8 5
Returns in ARGBLK
+-------------------------------------------------------+
ARGBLK+0 | |
+-------------------------------------------------------+
ARGBLK+1 | Return code |
+-------------------------------------------------------+
ARGBLK+2 | |
+---------------------------+---------------------------+
ARGBLK+3 | Facilities length | |
+---------------------------+---------------------------+
ARGBLK+4 | User data length | |
+---------------------------+---------------------------+
0 1 1 3
7 8 5
MACRO-20 Gateway Access Routines Page 8
X%RCD
Read Clear Data
MOVEI AC1,ARGBLK
PUSHJ 17,X%RCD
Accepts in ARGBLK
+-------------------------------------------------------+
ARGBLK+0 | Port number |
+-------------------------------------------------------+
ARGBLK+1 | |
+-------------------------------------------------------+
ARGBLK+2 | |
+---------------------------+---------------------------+
ARGBLK+3 | Facilities buffer length | Facilities buffer address |
+---------------------------+---------------------------+
ARGBLK+4 | User data buffer length | User data buffer address |
+---------------------------+---------------------------+
0 1 1 3
7 8 5
Returns in ARGBLK
+-------------------------------------------------------+
ARGBLK+0 | |
+-------------------------------------------------------+
ARGBLK+1 | Return code |
+---------------------------+---------------------------+
ARGBLK+2 | Clear cause | Clear diagnostic |
+---------------------------+---------------------------+
ARGBLK+3 | Facilities length | |
+---------------------------+---------------------------+
ARGBLK+4 | User data length | |
+---------------------------+---------------------------+
0 1 1 3
7 8 5
MACRO-20 Gateway Access Routines Page 9
X%RDM
Read Data Message
MOVEI AC1,ARGBLK
PUSHJ 17,X%RDM
Accepts in ARGBLK
+-------------------------------------------------------+
ARGBLK+0 | Port number |
+-------------------------------------------------------+
ARGBLK+1 | |
+---------------------------+---------------------------+
ARGBLK+2 | | Destination length |
+---------------------------+---------------------------+
ARGBLK+3 | Destination designator |
+-------------------------------------------------------+
0 1 1 3
7 8 5
Returns in ARGBLK
+-------------------------------------------------------+
ARGBLK+0 | |
+-------------------------------------------------------+
ARGBLK+1 | Return code |
+-+-+-----------------------+---------------------------+
ARGBLK+2 |M|Q| | Received data length |
+-+-+-----------------------+---------------------------+
ARGBLK+3 | Updated destination designator |
+-------------------------------------------------------+
0 1 1 1 3
7 8 5
where
M bit (XM%MOR) is the MORE bit and
Q bit (XM%QUA) is the data qualification bit.
MACRO-20 Gateway Access Routines Page 10
X%RIC
Read Incoming Call
MOVEI AC1,ARGBLK
PUSHJ 17,X%RIC
Accepts in ARGBLK
+-------------------------------------------------------+
ARGBLK+0 | Port number |
+-------------------------------------------------------+
ARGBLK+1 | |
+-------------------------------------------------------+
ARGBLK+2 | Byte pointer to destination for ASCIZ network name |
+-------------------------------------------------------+
ARGBLK+3 | Byte pointer to destination for ASCIZ source DTE |
+-------------------------------------------------------+
ARGBLK+4 | Byte pointer to destination for ASCIZ destination DTE |
+-------------------------------------------------------+
ARGBLK+5 | Byte pointer to destination for ASCIZ user group name |
+---------------------------+---------------------------+
ARGBLK+6 | Facilities buffer length | Facilities buffer address |
+---------------------------+---------------------------+
ARGBLK+7 | User data buffer length | User data buffer address |
+---------------------------+---------------------------+
0 1 1 3
7 8 5
Returns in ARGBLK
+-------------------------------------------------------+
ARGBLK+0 | |
+-------------------------------------------------------+
ARGBLK+1 | Return code |
+-------------------------------------------------------+
ARGBLK+2 | |
+-------------------------------------------------------+
ARGBLK+3 | |
+-------------------------------------------------------+
ARGBLK+4 | |
+-------------------------------------------------------+
ARGBLK+5 | |
+---------------------------+---------------------------+
ARGBLK+6 | Facilities length | |
+---------------------------+---------------------------+
ARGBLK+7 | User data length | |
+---------------------------+---------------------------+
0 1 1 3
7 8 5
MACRO-20 Gateway Access Routines Page 11
X%RIM
Read Interrupt Message
MOVEI AC1,ARGBLK
PUSHJ 17,X%RIM
Accepts in ARGBLK
+-------------------------------------------------------+
ARGBLK+0 | Port number |
+-------------------------------------------------------+
ARGBLK+1 | |
+-------------------------------------------------------+
ARGBLK+2 | |
+-------------------------------------------------------+
0 3
5
Returns in ARGBLK
+-------------------------------------------------------+
ARGBLK+0 | |
+-------------------------------------------------------+
ARGBLK+1 | Return code |
+------------------------------------------+------------+
ARGBLK+2 | | Data |
+------------------------------------------+------------+
0 2 3
8 5
MACRO-20 Gateway Access Routines Page 12
X%RPS
Read Port Status
MOVEI AC1,ARGBLK
PUSHJ 17,X%RPS
Accepts in ARGBLK
+-------------------------------------------------------+
ARGBLK+0 | Port number |
+-------------------------------------------------------+
ARGBLK+1 | |
+-------------------------------------------------------+
ARGBLK+2 | |
+-------------------------------------------------------+
ARGBLK+3 | |
+-------------------------------------------------------+
0 3
5
Returns in ARGBLK
+-------------------------------------------------------+
ARGBLK+0 | |
+-------------------------------------------------------+
ARGBLK+1 | Return code |
+---------------------------+---------------------------+
ARGBLK+2 | Error detail | Current port state |
+-+-+-+-+-------------------+---------------------------+
ARGBLK+3 | | | | | | Current packet size |
+-+-+-+-+-------------------+---------------------------+
0 1 2 3 1 1 3
7 8 5
The returned status bits are:
0 XM%IIC Incoming interrupt confirmation is pending.
1 XM%OIC Outgoing interrupt confirmation is pending.
2 XM%DAT Incoming data is available.
3 XM%INT Incoming interrupt data is available.
MACRO-20 Gateway Access Routines Page 13
X%RRD
Read Reset Data
MOVEI AC1,ARGBLK
PUSHJ 17,X%RRD
Accepts in ARGBLK
+-------------------------------------------------------+
ARGBLK+0 | Port number |
+-------------------------------------------------------+
ARGBLK+1 | |
+-------------------------------------------------------+
ARGBLK+2 | |
+-------------------------------------------------------+
0 3
5
Returns in ARGBLK
+-------------------------------------------------------+
ARGBLK+0 | |
+-------------------------------------------------------+
ARGBLK+1 | Return code |
+---------------------------+---------------------------+
ARGBLK+2 | Reset cause | Reset diagnostic |
+---------------------------+---------------------------+
0 1 1 3
7 8 5
MACRO-20 Gateway Access Routines Page 14
X%RVC
Reset Virtual Circuit
MOVEI AC1,ARGBLK
PUSHJ 17,X%RVC
Accepts in ARGBLK
+-------------------------------------------------------+
ARGBLK+0 | Port number |
+-------------------------------------------------------+
ARGBLK+1 | |
+------------------------------------------+------------+
ARGBLK+2 | | Diagnostic |
+------------------------------------------+------------+
0 2 3
8 5
Returns in ARGBLK
+-------------------------------------------------------+
ARGBLK+0 | |
+-------------------------------------------------------+
ARGBLK+1 | Return code |
+-------------------------------------------------------+
ARGBLK+2 | |
+-------------------------------------------------------+
0 3
5
MACRO-20 Gateway Access Routines Page 15
X%SDM
Send Data Message
MOVEI AC1,ARGBLK
PUSHJ 17,X%SDM
Accepts in ARGBLK
+-------------------------------------------------------+
ARGBLK+0 | Port number |
+-------------------------------------------------------+
ARGBLK+1 | |
+-+-+-----------------------+---------------------------+
ARGBLK+2 |M|Q| | Data length |
+-+-+-----------------------+---------------------------+
ARGBLK+3 | Source designator |
+-------------------------------------------------------+
0 3
5
where
M bit (XM%MOR) is the MORE bit and
Q bit (XM%QUA) is the data qualification bit.
Returns in ARGBLK
+-------------------------------------------------------+
ARGBLK+0 | |
+-------------------------------------------------------+
ARGBLK+1 | Return code |
+-------------------------------------------------------+
ARGBLK+2 | |
+-------------------------------------------------------+
ARGBLK+3 | Updated source designator |
+-------------------------------------------------------+
0 3
5
MACRO-20 Gateway Access Routines Page 16
X%SIM
Send Interrupt Message
MOVEI AC1,ARGBLK
PUSHJ 17,X%SIM
Accepts in ARGBLK
+-------------------------------------------------------+
ARGBLK+0 | Port number |
+-------------------------------------------------------+
ARGBLK+1 | |
+------------------------------------------+------------+
ARGBLK+2 | | Data |
+------------------------------------------+------------+
0 2 3
8 5
Returns in ARGBLK
+-------------------------------------------------------+
ARGBLK+0 | |
+-------------------------------------------------------+
ARGBLK+1 | Return code |
+-------------------------------------------------------+
ARGBLK+2 | |
+-------------------------------------------------------+
0 3
5
MACRO-20 Gateway Access Routines Page 17
X%TPA
Terminate Port Access
MOVEI AC1,ARGBLK
PUSHJ 17,X%TPA
Accepts in ARGBLK
+-------------------------------------------------------+
ARGBLK+0 | Port number |
+-------------------------------------------------------+
ARGBLK+1 | |
+-------------------------------------------------------+
0 3
5
Returns in ARGBLK
+-------------------------------------------------------+
ARGBLK+0 | |
+-------------------------------------------------------+
ARGBLK+1 | Return code |
+-------------------------------------------------------+
0 3
5
MACRO-20 Gateway Access Routines Page 18
X%WIC
Wait Incoming Call
MOVEI AC1,ARGBLK
PUSHJ 17,X%WIC
Accepts in ARGBLK
+---------------------------+---------------------------+
ARGBLK+0 | Interrupt channel | Workspace buffer address |
+---------------------------+---------------------------+
ARGBLK+1 | |
+-------------------------------------------------------+
ARGBLK+2 | ASCIZ byte pointer to SRV: file descriptor |
+-------------------------------------------------------+
0 1 1 3
7 8 5
Returns in ARGBLK
+-------------------------------------------------------+
ARGBLK+0 | Port number |
+-------------------------------------------------------+
ARGBLK+1 | Return code |
+-------------------------------------------------------+
ARGBLK+2 | |
+-------------------------------------------------------+
0 3
5
MACRO-20 Gateway Access Routines Page 19
Port States
Code
0 XS%UND Undefined
1 XS%OPN Opening
2 XS%CAG Calling
3 XS%LSN Listening
4 XS%CAD Called
5 XS%RUN Running
6 XS%SYN Synchronizing
7 XS%UNS Unsynchronized
10 XS%CLG Clearing
11 XS%CLD Cleared
12 XS%ERR Error
13 XS%NCM No Communication
MACRO-20 Gateway Access Routines Page 20
Return Code
Bit
18 XC%RSS Reset seen
19 XC%VSK Version skew
20 XC%BTS Buffer is too short
21 XC%BTL Buffer is too long
22 XC%SDL Source DTE subaddress is too long
23 XC%DDL Destination DTE address is too long
24 XC%NIC No interrupt confirmation is requested
25 XC%AIC Awaiting interrupt confirmation
26 XC%NDN No destination
27 XC%INA Illegal network access code
28 XC%DFT Data field truncated
29 XC%FFT Facilities field truncated
30 XC%UNN Unknown network name
31 XC%NIN No interrupt to read
32 XC%NDA No data to read
33 XC%PER Procedure error
34 XC%IAR Insufficient access resources
35 XC%IGR Insufficient gateway resources
None XC%SUC Successful
Error State Detail
Bit
7 XE%VSK Version skewed
8 XE%DDL Destination DTE address is too long
9 XE%SDL Source DTE subaddress is too long
10 XE%FFT Facilities field truncated
11 XE%DFT Data field truncated
12 XE%NCM No communication with the Gateway
13 XE%UNN Undefined network name
14 XE%UCN Undefined circuit name
15 XE%INU Circuit in use
16 XE%IGR Insufficient gateway resources
17 XE%UNK Unknown error