Trailing-Edge
-
PDP-10 Archives
-
BB-FB51A-RM
-
sna-ai/sources/test.mac
There are 8 other files named test.mac in the archive. Click here to see a list.
SALL
TITLE AI TEST Application Interface Test Program
SEARCH MONSYM,MACSYM,SNASYM
;
ASCIZ /
COPYRIGHT (c) 1984, 1985
DIGITAL EQUIPMENT CORPORATION
/
; This software is furnished under a license and may be used
; and copied only in accordance with the terms of such license
; and with the inclusion of the above copyright notice. This
; software or any other copies thereof may not be provided or
; otherwise made available to any other person. No title to
; and ownership of the software is hereby transferred.
;
; The information in this software is subject to change
; without notice and should not be construed as a commitment
; by DIGITAL EQUIPMENT CORPORATION.
;
; DIGITAL assumes no responsibility for the use or reliability
; of its software on equipment which is not supplied by
; DIGITAL.
;
S1=1
S2=2
S3=3
T1=5
T2=6
SP=17
SIZE=^D256
STACK: BLOCK SIZE ; User stack
BUFFER: BLOCK ^D32 ; Data buffer
STATE: BLOCK 1 ; Port state
PRTBLK: BLOCK ^D512 ; Port work area
ABTBUF: BLOCK 4 ; Buffer for abort data
BINBUF: BLOCK ^D128 ; Buffer for Binddata
ARGBLK: BLOCK ^D13 ; General argument block
START: RESET
MOVE SP,[IOWD SIZE,STACK] ; Set up the stack
MOVEI T1,AS%UND ; Init port state
MOVEM T1,STATE ; to undefined
SETZM ARGBLK ; Zero the Aurgument
MOVE T1,[ARGBLK,,ARGBLK+1] ; block
BLT T1,ARGBLK+^D12
MOVE T1,[-1,,PRTBLK] ; interrupt channel,,PRTBLK
MOVEM T1,ARGBLK ; store in ARGBLK
MOVE T1,[POINT 7,[ASCIZ/CICS/]] ; Access name, IBM application
MOVEM T1,ARGBLK+^D10 ; Pointer in block
MOVEI S1,ARGBLK ; Address of ARGBLK in AC1
PUSHJ SP,A%CON## ; Call CONNECT to IBM
MOVE T1,ARGBLK+1 ; Check the return status
CAIE T1,AC%SUC ; Success?
JRST ERRCON
MOVE S1,[POINT 7, [ASCIZ /CONNECT establised
/]]
PSOUT ; Tell user CONNECT established
MOVEI T1,AS%BNW ; Change state to Bind Wait
MOVEM T1,STATE ; And save it
LOOP: SETZM ARGBLK+1
MOVE T1,[ARGBLK+1,,ARGBLK+2] ; Zero the argument block
BLT T1,ARGBLK+^D12
MOVEI S1,ARGBLK ; Move address of ARGBLK to AC1
PUSHJ SP,A%RDE## ; Read Data Events
MOVE T1,ARGBLK+1 ; Check return status
CAIE T1,AC%SUC ; Success?
JRST SNATPA ; No, exit
MOVE T1,STATE ; Check port state
MOVE T2,ARGBLK+3 ; Get new port state
CAIN T1,AS%BNW ; State Bind wait?
JRST [CAIN T2,AS%BNW
JRST LOOP ; Yes, keep polling
CAIN T2,AS%BNR ; Has the bind come in?
JRST ACCPT ; Yes, accept any bind
JRST SNATPA] ; No, must be error
CAIN T1,AS%RCN ; Reconnect seen?
JRST [CAIE T2,AS%RUN ; Running?
JRST SNATPA ; No, must be error
JRST EXIT] ; Port running, all done!
JRST SNATPA ; No recconect, must be error
ERRCON: MOVE S1,[POINT 7,[ASCIZ /
Error establising DECNET connection
/]]
PSOUT ; Let user know Error
CAIN T1,AC%NLN ; No logical name
JRST [MOVE S1,[POINT 7,[ASCIZ /
No Translation for logical name SNAGAT
/]]
PSOUT
HALTF]
MOVE S1,[POINT 7,[ASCIZ /
Gateway node not reachable
/]]
PSOUT
HALTF ; Just stop, node not available
ACCPT: MOVE S1,[POINT 7,[ASCIZ /
Bind Recieved
/]]
PSOUT ; Let user know Bind recieved
SETZM ARGBLK+1 ; Zero the argument block
MOVE T1,[ARGBLK+1,,ARGBLK+2]
BLT T1,ARGBLK+^D12
MOVE T1,[POINT 8, BINBUF] ; Get the Bind data
MOVEM T1,ARGBLK+^D3 ; Pointer to Bind buffer
MOVEI S1,ARGBLK ; Address of ARGBLK in AC1
PUSHJ SP,A%RBD## ; Read bind data
MOVE T1,ARGBLK+1 ; Check for success
CAIE T1,AC%SUC ; Success?
JRST SNATPA ; No, error
MOVE S1,[POINT 7,[ASCIZ /
Bind Data
/]]
PSOUT ; Yes, let user know
MOVEI S1,ARGBLK ; Print
PUSHJ SP,A%OUT## ; Bind data
SETZM ARGBLK+1
MOVE T1,[ARGBLK+1,,ARGBLK+2] ; Zero Argument block
BLT T1,ARGBLK+^D12
MOVEI S1,ARGBLK ; Address of ARGBLK in AC1
PUSHJ SP,A%ACC## ; Accept the Bind
MOVE T1,ARGBLK+1 ; Check return code
CAIE T1,AC%SUC ; Success?
JRST SNATPA ; No
MOVE S1,[POINT 7, [ASCIZ /
ACCEPT Bind
/]]
PSOUT ; Yes, let user know
MOVE T1,AS%RUN ; Change state
MOVEM T1,STATE ; to running
EXIT: MOVE S1,[POINT 7, [ASCIZ /Exit...
/]]
PSOUT
JRST END ; That's all folks
SNATPA: MOVE S1,[POINT 7, [ASCIZ /Error, exiting...
Optional Abort Data:
/]]
PSOUT ; Let user know we have an error
SETZM ARGBLK+1 ; Zero Argument block
MOVE T1,[ARGBLK+1,,ARGBLK+2]
BLT T1,ARGBLK+^D12
MOVE T1,[POINT 8, ABTBUF] ; Abort buffer
MOVEM T1,ARGBLK+6
MOVEI S1,ARGBLK ; Address of ARGBLK in AC1
PUSHJ SP,A%RAD## ; Read the Abort Data
MOVE T1,ARGBLK+1 ; Check return code
CAIE T1,AC%SUC ; Success?
JRST END ; No, END
MOVEI S1,ARGBLK ; Yes, print the Abort code
PUSHJ SP,A%OAD## ; Output Abort Data
END: SETZM ARGBLK+1 ; Zero ARGBLK
MOVE T1,[ARGBLK+1,,ARGBLK+2]
BLT T1,ARGBLK+^D12
MOVEI S1,ARGBLK ; Address of ARGBLK in AC1
PUSHJ SP,A%TER## ; Terminate the Port
HALTF ; THE END...
END START