Google
 

Trailing-Edge - PDP-10 Archives - BB-FB51A-RM - sna-ai/sources/saidlf.lst
There are no other files named saidlf.lst in the archive.
		SNA GATEWAY ACCESS DECNET LINK FUNCTIONS	13-Feb-1985 13:32:58	TOPS-20 Bliss-36 4A(225)	    Page   1
								21-Jan-1985 13:44:41	STAR:<SNA.TAPE2.AI.SOURCE>SAIDLF.B36.1 (1)

;   0001  0	%title 'SNA GATEWAY ACCESS DECNET LINK FUNCTIONS'
;   0002  0	
;   0003  0	module SAIDLF (ident = 'Version 1.0') =
;   0004  1	begin
;   0005  1	
;   0006  1	! Copyright (c) 1985 by
;   0007  1	! DIGITAL EQUIPMENT CORPORATION, Maynard, Massachusetts
;   0008  1	!
;   0009  1	! This software is furnished under a license and may be used and  copied
;   0010  1	! only  in  accordance  with  the  terms  of  such  license and with the
;   0011  1	! inclusion of the above copyright notice.  This software or  any  other
;   0012  1	! copies  thereof may not be provided or otherwise made available to any
;   0013  1	! other person.  No title to and ownership of  the  software  is  hereby
;   0014  1	! transferred.
;   0015  1	!
;   0016  1	! The information in this software is subject to change  without  notice
;   0017  1	! and  should  not  be  construed  as  a commitment by Digital Equipment
;   0018  1	! Corporation.
;   0019  1	!
;   0020  1	! Digital assumes no responsibility for the use or  reliability  of  its
;   0021  1	! software on equipment which is not supplied by Digital.
;   0022  1	
;   0023  1	
;   0024  1	!++
;   0025  1	! FACILITY:
;   0026  1	!
;   0027  1	!	SNA Gateway Access Module
;   0028  1	!
;   0029  1	! ABSTRACT:
;   0030  1	!
;   0031  1	!       The module contains routines to handle various functions related to
;   0032  1	!       DECnet logical link activities native to the TOPS-20 systems.
;   0033  1	!
;   0034  1	! ENVIRONMENT:
;   0035  1	!
;   0036  1	!	TOPS-20 Operating Systems, user interface.
;   0037  1	!
;   0038  1	! AUTHOR:	Vicki Gary, CREATION DATE: March 17, 1984
;   0039  1	!
;   0040  1	! MODIFIED BY:
;   0041  1	!
;   0042  1	! 	, : Version
;   0043  1	! 01	-
;   0044  1	!--
SAIDLF		SNA GATEWAY ACCESS DECNET LINK FUNCTIONS	13-Feb-1985 13:32:58	TOPS-20 Bliss-36 4A(225)	    Page   2
Version 1.0							21-Jan-1985 13:44:41	STAR:<SNA.TAPE2.AI.SOURCE>SAIDLF.B36.1 (2)

;   0045  1	!
;   0046  1	! TABLE OF CONTENTS
;   0047  1	!
;   0048  1	
;   0049  1	!
;   0050  1	! INCLUDE FILES
;   0051  1	!
;   0052  1	
;   0053  1	library 'MONSYM';                       ! Monitor symbols
;   0054  1	library 'SNACOM';                       ! SNA Gateway Access Common symbols
;   0055  1	require 'JSYS';                         ! JSYS declarations
;   0396  1	
;   0397  1	!
;   0398  1	! MACROS
;   0399  1	!
;   0400  1	
; M 0401  1	macro RETURN_ERROR (ERROR) =            ! Macro to set error code for 
; M 0402  1	    begin                               ! port status block
; M 0403  1	    PORT[PCB_STATE] = AS_ABD;
; M 0404  1	    PORT[PCB_ERROR] = ERROR;
; M 0405  1	
; M 0406  1	    return;
;   0407  1	    end %;
;   0408  1	
;   0409  1	!
;   0410  1	! FORWARD REFERANCES
;   0411  1	!
;   0412  1	
;   0413  1	forward routine
;   0414  1	       GAL$TERMINATE;
;   0415  1	
;   0416  1	!
;   0417  1	! EXTERNAL REFERENCES
;   0418  1	!
;   0419  1	
;   0420  1	external routine                        ! Gateway Access DECnet functions
;   0421  1	    GAD$ABORT_LINK,
;   0422  1	    GAD$DISCONNECT_LINK,
;   0423  1	    GAD$RECEIVE_DATA,
;   0424  1	    GAD$RECEIVE_INTERRUPT,
;   0425  1	    GAD$LINK_STATUS,
;   0426  1	    GAD$PROTOCOL_TYPE;
;   0427  1	
;   0428  1	external routine                        ! Gateway Access Protocol I/O
;   0429  1	    GAP$I_BINDDATA,
;   0430  1	    GAP$I_DATA,
;   0431  1	    GAP$I_FLUSH_BUF,
;   0432  1	    GAP$I_RECON_PEND,
;   0433  1	    GAP$I_PROTOCOL_TYPE;
;   0434  1	
SAIDLF		SNA GATEWAY ACCESS DECNET LINK FUNCTIONS	13-Feb-1985 13:32:58	TOPS-20 Bliss-36 4A(225)	    Page   3
Version 1.0	GAL$CONFIRM_VERSION   (GALCFV)			21-Jan-1985 13:44:41	STAR:<SNA.TAPE2.AI.SOURCE>SAIDLF.B36.1 (3)

;   0435  1	%routine ('GAL$CONFIRM_VERSION', JFN) =
;   0436  1	
;   0437  1	!++
;   0438  1	! FUNCTIONAL DESCRIPTION:
;   0439  1	!
;   0440  1	!       Function reads version numbers supplied by the Gateway Module,
;   0441  1	!       verifies the compatibility of the Gateway Access Module and the
;   0442  1	!       Gateway Module. If the two are compatible, according to the
;   0443  1	!       verification of the Gateway Access Module, then it sends its
;   0444  1	!       own version numbers back to the Gateway Module, otherwise, it
;   0445  1	!       sends a reject code.
;   0446  1	!
;   0447  1	! FORMAL PARAMETERS:
;   0448  1	!
;   0449  1	!	JFN             DECnet logical link JFN to the Gateway Module.
;   0450  1	!
;   0451  1	! IMPLICIT INPUTS:
;   0452  1	!
;   0453  1	!	none
;   0454  1	!
;   0455  1	! IMPLICIT OUTPUTS:
;   0456  1	!
;   0457  1	!	none
;   0458  1	!
;   0459  1	! COMPLETION CODES:
;   0460  1	!
;   0461  1	!	none
;   0462  1	!
;   0463  1	! SIDE EFFECTS:
;   0464  1	!
;   0465  1	!	If the Gateway Access Module reject the version numbers supplied
;   0466  1	!       by the Gateway Module, the Gateway Module terminates the link
;   0467  1	!       between the two.
;   0468  1	!
;   0469  1	!--
;   0470  1	
;   0471  2	   begin
;   0472  2	
;   0473  2	        local
;   0474  2	        TMPBUF,
;   0475  2	        POINTER;
;   0476  2	
;   0477  2	        POINTER = ch$ptr (TMPBUF,,8);
;   0478  2	         return jsys_mtopr (.JFN, $mocc, .POINTER, 3);
;   0479  2	
;   0480  1	   end;


	TITLE	SAIDLF
	TWOSEG
SAIDLF		SNA GATEWAY ACCESS DECNET LINK FUNCTIONS	13-Feb-1985 13:32:58	TOPS-20 Bliss-36 4A(225)	    Page   4
Version 1.0	GAL$CONFIRM_VERSION   (GALCFV)			21-Jan-1985 13:44:41	STAR:<SNA.TAPE2.AI.SOURCE>SAIDLF.B36.1 (3)

	.REQUEST  SYS:B362LB.REL


	EXTERN	GADABT, GADDIS, GADRCV, GADRCI, GADSTA, GADTYP, GPIBIN, GPIDAT, GPIFLB, GPIRCP, GPITYP


JSYS_ACCES==	    552				;						000000	000552
JSYS_ADBRK==	    570				;						000000	000570
JSYS_AIC==	    131				;						000000	000131
JSYS_ALLOC==	    520				;						000000	000520
JSYS_ARCF==	    247				;						000000	000247
JSYS_ASND==	    70				;						000000	000070
JSYS_ASNSQ==	    752				;						000000	000752
JSYS_ATACH==	    116				;						000000	000116
JSYS_ATI==	    137				;						000000	000137
JSYS_ATNVT==	    274				;						000000	000274
JSYS_BIN==	    50				;						000000	000050
JSYS_BKJFN==	    42				;						000000	000042
JSYS_BOOT==	    562				;						000000	000562
JSYS_BOUT==	    51				;						000000	000051
JSYS_CACCT==	    4				;						000000	000004
JSYS_CFIBF==	    100				;						000000	000100
JSYS_CFOBF==	    101				;						000000	000101
JSYS_CFORK==	    152				;						000000	000152
JSYS_CHFDB==	    64				;						000000	000064
JSYS_CHKAC==	    521				;						000000	000521
JSYS_CIS==	    141				;						000000	000141
JSYS_CLOSF==	    22				;						000000	000022
JSYS_CLZFF==	    34				;						000000	000034
JSYS_COMND==	    544				;						000000	000544
JSYS_CRDIR==	    240				;						000000	000240
JSYS_CRJOB==	    2				;						000000	000002
JSYS_CRLNM==	    502				;						000000	000502
JSYS_CVHST==	    276				;						000000	000276
JSYS_CVSKT==	    275				;						000000	000275
JSYS_DEBRK==	    136				;						000000	000136
JSYS_DELDF==	    67				;						000000	000067
JSYS_DELF==	    26				;						000000	000026
JSYS_DELNF==	    317				;						000000	000317
JSYS_DEQ==	    514				;						000000	000514
JSYS_DEVST==	    121				;						000000	000121
JSYS_DFIN==	    234				;						000000	000234
JSYS_DFOUT==	    235				;						000000	000235
JSYS_DIAG==	    530				;						000000	000530
JSYS_DIBE==	    212				;						000000	000212
JSYS_DIC==	    133				;						000000	000133
JSYS_DIR==	    130				;						000000	000130
JSYS_DIRST==	    41				;						000000	000041
JSYS_DISMS==	    167				;						000000	000167
JSYS_DOBE==	    104				;						000000	000104
JSYS_DSKAS==	    244				;						000000	000244
JSYS_DSKOP==	    242				;						000000	000242
SAIDLF		SNA GATEWAY ACCESS DECNET LINK FUNCTIONS	13-Feb-1985 13:32:58	TOPS-20 Bliss-36 4A(225)	    Page   5
Version 1.0	GAL$CONFIRM_VERSION   (GALCFV)			21-Jan-1985 13:44:41	STAR:<SNA.TAPE2.AI.SOURCE>SAIDLF.B36.1 (3)

JSYS_DTACH==	    115				;						000000	000115
JSYS_DTI==	    140				;						000000	000140
JSYS_DUMPI==	    65				;						000000	000065
JSYS_DUMPO==	    66				;						000000	000066
JSYS_DVCHR==	    117				;						000000	000117
JSYS_EIR==	    126				;						000000	000126
JSYS_ENQ==	    513				;						000000	000513
JSYS_ENQC==	    515				;						000000	000515
JSYS_EPCAP==	    151				;						000000	000151
JSYS_ERSTR==	    11				;						000000	000011
JSYS_ESOUT==	    313				;						000000	000313
JSYS_FFFFP==	    31				;						000000	000031
JSYS_FFORK==	    154				;						000000	000154
JSYS_FFUFP==	    211				;						000000	000211
JSYS_FLHST==	    277				;						000000	000277
JSYS_FLIN==	    232				;						000000	000232
JSYS_FLOUT==	    233				;						000000	000233
JSYS_GACCT==	    546				;						000000	000546
JSYS_GACTF==	    37				;						000000	000037
JSYS_GCVEC==	    300				;						000000	000300
JSYS_GDSKC==	    214				;						000000	000214
JSYS_GDSTS==	    145				;						000000	000145
JSYS_GDVEC==	    542				;						000000	000542
JSYS_GET==	    200				;						000000	000200
JSYS_GETAB==	    10				;						000000	000010
JSYS_GETER==	    12				;						000000	000012
JSYS_GETJI==	    507				;						000000	000507
JSYS_GETNM==	    177				;						000000	000177
JSYS_GETOK_==	    574				;						000000	000574
JSYS_GEVEC==	    205				;						000000	000205
JSYS_GFRKH==	    164				;						000000	000164
JSYS_GFRKS==	    166				;						000000	000166
JSYS_GFUST==	    550				;						000000	000550
JSYS_GIVOK_==	    576				;						000000	000576
JSYS_GJINF==	    13				;						000000	000013
JSYS_GNJFN==	    17				;						000000	000017
JSYS_GPJFN==	    206				;						000000	000206
JSYS_GTAD==	    227				;						000000	000227
JSYS_GTDAL==	    305				;						000000	000305
JSYS_GTDIR==	    241				;						000000	000241
JSYS_GTFDB==	    63				;						000000	000063
JSYS_GTHST==	    273				;						000000	000273
JSYS_GTJFN==	    20				;						000000	000020
JSYS_GTRPI==	    172				;						000000	000172
JSYS_GTNCP==	    272				;						000000	000272
JSYS_GTRPW==	    171				;						000000	000171
JSYS_GTSTS==	    24				;						000000	000024
JSYS_GTTYP==	    303				;						000000	000303
JSYS_HALTF==	    170				;						000000	000170
JSYS_HFORK==	    162				;						000000	000162
JSYS_HPTIM==	    501				;						000000	000501
JSYS_HSYS==	    307				;						000000	000307
SAIDLF		SNA GATEWAY ACCESS DECNET LINK FUNCTIONS	13-Feb-1985 13:32:58	TOPS-20 Bliss-36 4A(225)	    Page   6
Version 1.0	GAL$CONFIRM_VERSION   (GALCFV)			21-Jan-1985 13:44:41	STAR:<SNA.TAPE2.AI.SOURCE>SAIDLF.B36.1 (3)

JSYS_IDCNV==	    223				;						000000	000223
JSYS_IDTIM==	    221				;						000000	000221
JSYS_IDTNC==	    231				;						000000	000231
JSYS_IIC==	    132				;						000000	000132
JSYS_INLNM==	    503				;						000000	000503
JSYS_JFNS==	    30				;						000000	000030
JSYS_KFORK==	    153				;						000000	000153
JSYS_LGOUT==	    3				;						000000	000003
JSYS_LNMST==	    504				;						000000	000504
JSYS_LOGIN==	    1				;						000000	000001
JSYS_LPINI==	    547				;						000000	000547
JSYS_MDDT_==	    777				;						000000	000777
JSYS_METER_==	    766				;						000000	000766
JSYS_MRECV==	    511				;						000000	000511
JSYS_MSEND==	    510				;						000000	000510
JSYS_MSFRK==	    312				;						000000	000312
JSYS_MSTR==	    555				;						000000	000555
JSYS_MTALN==	    774				;						000000	000774
JSYS_MTOPR==	    77				;						000000	000077
JSYS_MTU_==	    600				;						000000	000600
JSYS_MUTIL==	    512				;						000000	000512
JSYS_NIN==	    225				;						000000	000225
JSYS_NODE==	    567				;						000000	000567
JSYS_NOUT==	    224				;						000000	000224
JSYS_ODCNV==	    222				;						000000	000222
JSYS_ODTIM==	    220				;						000000	000220
JSYS_ODTNC==	    230				;						000000	000230
JSYS_OPENF==	    21				;						000000	000021
JSYS_PBIN==	    73				;						000000	000073
JSYS_PBOUT==	    74				;						000000	000074
JSYS_PEEK==	    311				;						000000	000311
JSYS_PLOCK==	    561				;						000000	000561
JSYS_PMAP==	    56				;						000000	000056
JSYS_PMCTL==	    560				;						000000	000560
JSYS_PPNST==	    557				;						000000	000557
JSYS_PRARG==	    545				;						000000	000545
JSYS_PSOUT==	    76				;						000000	000076
JSYS_RCDIR==	    553				;						000000	000553
JSYS_RCM==	    134				;						000000	000134
JSYS_RCUSR==	    554				;						000000	000554
JSYS_RCVIM==	    751				;						000000	000751
JSYS_RCVOK_==	    575				;						000000	000575
JSYS_RDTTY==	    523				;						000000	000523
JSYS_RELD==	    71				;						000000	000071
JSYS_RELSQ==	    753				;						000000	000753
JSYS_RESET==	    147				;						000000	000147
JSYS_RFACS==	    161				;						000000	000161
JSYS_RFBSZ==	    45				;						000000	000045
JSYS_RFCOC==	    112				;						000000	000112
JSYS_RFMOD==	    107				;						000000	000107
JSYS_RFORK==	    155				;						000000	000155
JSYS_RFPOS==	    111				;						000000	000111
SAIDLF		SNA GATEWAY ACCESS DECNET LINK FUNCTIONS	13-Feb-1985 13:32:58	TOPS-20 Bliss-36 4A(225)	    Page   7
Version 1.0	GAL$CONFIRM_VERSION   (GALCFV)			21-Jan-1985 13:44:41	STAR:<SNA.TAPE2.AI.SOURCE>SAIDLF.B36.1 (3)

JSYS_RFPTR==	    43				;						000000	000043
JSYS_RFRKH==	    165				;						000000	000165
JSYS_RFSTS==	    156				;						000000	000156
JSYS_RFTAD==	    533				;						000000	000533
JSYS_RIN==	    54				;						000000	000054
JSYS_RIR==	    144				;						000000	000144
JSYS_RIRCM==	    143				;						000000	000143
JSYS_RLJFN==	    23				;						000000	000023
JSYS_RMAP==	    61				;						000000	000061
JSYS_RNAMF==	    35				;						000000	000035
JSYS_ROUT==	    55				;						000000	000055
JSYS_RPACS==	    57				;						000000	000057
JSYS_RPCAP==	    150				;						000000	000150
JSYS_RSCAN==	    500				;						000000	000500
JSYS_RTFRK==	    322				;						000000	000322
JSYS_RTIW==	    173				;						000000	000173
JSYS_RUNTM==	    15				;						000000	000015
JSYS_RWM==	    135				;						000000	000135
JSYS_RWSET==	    176				;						000000	000176
JSYS_SACTF==	    62				;						000000	000062
JSYS_SAVE==	    202				;						000000	000202
JSYS_SCTTY==	    324				;						000000	000324
JSYS_SCVEC==	    301				;						000000	000301
JSYS_SDSTS==	    146				;						000000	000146
JSYS_SDVEC==	    543				;						000000	000543
JSYS_SETER==	    336				;						000000	000336
JSYS_SETJB==	    541				;						000000	000541
JSYS_SETNM==	    210				;						000000	000210
JSYS_SETSN==	    506				;						000000	000506
JSYS_SEVEC==	    204				;						000000	000204
JSYS_SFACS==	    160				;						000000	000160
JSYS_SFBSZ==	    46				;						000000	000046
JSYS_SFCOC==	    113				;						000000	000113
JSYS_SFMOD==	    110				;						000000	000110
JSYS_SFORK==	    157				;						000000	000157
JSYS_SFPOS==	    526				;						000000	000526
JSYS_SFPTR==	    27				;						000000	000027
JSYS_SFRKV==	    201				;						000000	000201
JSYS_SFTAD==	    534				;						000000	000534
JSYS_SFUST==	    551				;						000000	000551
JSYS_SIBE==	    102				;						000000	000102
JSYS_SIN==	    52				;						000000	000052
JSYS_SINR==	    531				;						000000	000531
JSYS_SIR==	    125				;						000000	000125
JSYS_SIRCM==	    142				;						000000	000142
JSYS_SIZEF==	    36				;						000000	000036
JSYS_SJPRI==	    245				;						000000	000245
JSYS_SKED_==	    577				;						000000	000577
JSYS_SKPIR==	    127				;						000000	000127
JSYS_SMAP_==	    767				;						000000	000767
JSYS_SMON==	    6				;						000000	000006
JSYS_SNDIM==	    750				;						000000	000750
SAIDLF		SNA GATEWAY ACCESS DECNET LINK FUNCTIONS	13-Feb-1985 13:32:58	TOPS-20 Bliss-36 4A(225)	    Page   8
Version 1.0	GAL$CONFIRM_VERSION   (GALCFV)			21-Jan-1985 13:44:41	STAR:<SNA.TAPE2.AI.SOURCE>SAIDLF.B36.1 (3)

JSYS_SNOOP==	    516				;						000000	000516
JSYS_SOBE==	    103				;						000000	000103
JSYS_SOBF==	    175				;						000000	000175
JSYS_SOUT==	    53				;						000000	000053
JSYS_SOUTR==	    532				;						000000	000532
JSYS_SPACS==	    60				;						000000	000060
JSYS_SPJFN==	    207				;						000000	000207
JSYS_SPLFK==	    314				;						000000	000314
JSYS_SPOOL==	    517				;						000000	000517
JSYS_SPRIW==	    243				;						000000	000243
JSYS_SSAVE==	    203				;						000000	000203
JSYS_STAD==	    226				;						000000	000226
JSYS_STCMP==	    540				;						000000	000540
JSYS_STDEV==	    120				;						000000	000120
JSYS_STI==	    114				;						000000	000114
JSYS_STIW==	    174				;						000000	000174
JSYS_STO==	    246				;						000000	000246
JSYS_STPAR==	    217				;						000000	000217
JSYS_STPPN==	    556				;						000000	000556
JSYS_STSTS==	    25				;						000000	000025
JSYS_STTYP==	    302				;						000000	000302
JSYS_SWJFN==	    47				;						000000	000047
JSYS_SWTRP_==	    573				;						000000	000573
JSYS_SYERR==	    527				;						000000	000527
JSYS_SYSGT==	    16				;						000000	000016
JSYS_TBADD==	    536				;						000000	000536
JSYS_TBDEL==	    535				;						000000	000535
JSYS_TBLUK==	    537				;						000000	000537
JSYS_TEXTI==	    524				;						000000	000524
JSYS_TFORK==	    321				;						000000	000321
JSYS_THIBR==	    770				;						000000	000770
JSYS_TIME==	    14				;						000000	000014
JSYS_TIMER==	    522				;						000000	000522
JSYS_TLINK==	    216				;						000000	000216
JSYS_TMON==	    7				;						000000	000007
JSYS_TTMSG==	    775				;						000000	000775
JSYS_TWAKE==	    771				;						000000	000771
JSYS_UFPGS==	    525				;						000000	000525
JSYS_USAGE==	    564				;						000000	000564
JSYS_USRIO==	    310				;						000000	000310
JSYS_UTEST==	    563				;						000000	000563
JSYS_UTFRK==	    323				;						000000	000323
JSYS_VACCT==	    566				;						000000	000566
JSYS_WAIT==	    306				;						000000	000306
JSYS_WFORK==	    163				;						000000	000163
JSYS_WILD_==	    565				;						000000	000565
JSYS_XRIR_==	    601				;						000000	000601
JSYS_XSIR_==	    602				;						000000	000602


AC0=	0
AC1=	1
SAIDLF		SNA GATEWAY ACCESS DECNET LINK FUNCTIONS	13-Feb-1985 13:32:58	TOPS-20 Bliss-36 4A(225)	    Page   9
Version 1.0	GAL$CONFIRM_VERSION   (GALCFV)			21-Jan-1985 13:44:41	STAR:<SNA.TAPE2.AI.SOURCE>SAIDLF.B36.1 (3)

AC2=	2
AC3=	3
AC4=	4
AC5=	5
AC6=	6
AC7=	7
AC10=	10
AC11=	11
AC12=	12
AC13=	13
AC14=	14
FP=	15
AC16=	16
SP=	17


	RELOC	400000				;					400000'
GALCFV: ADJSP	SP,1				; SP,1					400000' 105 17 0 00 000001		0435
	MOVEI	AC3,-1(SP)			; AC3,TMPBUF-1				400001' 201 03 0 17 777777		0477
	HRLI	AC3,41000			; AC3,41000				400002' 505 03 0 00 041000
	MOVE	AC1,-2(SP)			; AC1,JFN				400003' 200 01 0 17 777776		0478
	MOVEI	AC2,41				; AC2,41				400004' 201 02 0 00 000041
	MOVEI	AC4,3				; AC4,3					400005' 201 04 0 00 000003
	SETZ	AC5,				; AC5,					400006' 400 05 0 00 000000
	JSYS	77				; 77					400007' 104 00 0 00 000077
	JUMP	16,L.1				; 16,L.1				400010' 320 16 0 00 400012'
	MOVEI	AC5,1				; AC5,1					400011' 201 05 0 00 000001
L.1:	MOVE	AC1,AC5				; AC1,AC5				400012' 200 01 0 00 000005		0471
	ADJSP	SP,-1				; SP,-1					400013' 105 17 0 00 777777		0435
	POPJ	SP,				; SP,					400014' 263 17 0 00 000000

; Routine Size:  13 words


;   0481  1	
SAIDLF		SNA GATEWAY ACCESS DECNET LINK FUNCTIONS	13-Feb-1985 13:32:58	TOPS-20 Bliss-36 4A(225)	    Page  10
Version 1.0	GAL$RECEIVE_DATA   (GALRCD)			21-Jan-1985 13:44:41	STAR:<SNA.TAPE2.AI.SOURCE>SAIDLF.B36.1 (4)

;   0482  1	%routine ('GAL$RECEIVE_DATA', PORT: ref PORT_CONTROL_BLOCK) : novalue =
;   0483  1	
;   0484  1	!++
;   0485  1	! FUNCTIONAL DESCRIPTION:
;   0486  1	!
;   0487  1	!       Function reads data from the DECnet logical link, determines the type,
;   0488  1	!       buffers them or takes actions defined by the state machine.
;   0489  1	!
;   0490  1	! FORMAL PARAMETERS:
;   0491  1	!
;   0492  1	!	PORT            The port data base.
;   0493  1	!
;   0494  1	! IMPLICIT INPUTS:
;   0495  1	!
;   0496  1	!	none
;   0497  1	!
;   0498  1	! IMPLICIT OUTPUTS:
;   0499  1	!
;   0500  1	!	none
;   0501  1	!
;   0502  1	! COMPLETION CODES:
;   0503  1	!
;   0504  1	!	none
;   0505  1	!
;   0506  1	! SIDE EFFECTS:
;   0507  1	!
;   0508  1	!	Actions are taken immediately, when the type of the received data
;   0509  1	!       packets are determined.
;   0510  1	!
;   0511  1	!--
;   0512  1	
;   0513  2	    begin
;   0514  2	
;   0515  2	    local
;   0516  2	        POINTER,
;   0517  2	        TYPE,
;   0518  2	        DATA_BASE: ref USER_DATA_BASE;
;   0519  2	
;   0520  2	    POINTER = ch$ptr (.PORT[PCB_INPUT_BUFFER],,8);
;   0521  2	    ch$fill (0, IO_BUFFER_SIZE, .POINTER);
;   0522  2	    DATA_BASE = .PORT[PCB_DATA_BASE];
;   0523  2	
;   0524  2	    ! If the next packet to be read from the DECnet link is a data packet
;   0525  2	    ! then check to find out if user is ready to receive it, i.e. the
;   0526  2	    ! buffer is empty in the port data base. If the port data base buffer
;   0527  2	    ! is empty, then read it and proceed to the following packet; otherwise
;   0528  2	    ! ignore everything else and return.
;   0529  2	
;   0530  2	    if .PORT[PCB_DATA]
;   0531  3	    then begin
;   0532  3	         if not .DATA_BASE[UDB_DATA_AVAILABLE] ! Is user ready to receive ?
;   0533  4	         then begin                     ! Yes, then read
SAIDLF		SNA GATEWAY ACCESS DECNET LINK FUNCTIONS	13-Feb-1985 13:32:58	TOPS-20 Bliss-36 4A(225)	    Page  11
Version 1.0	GAL$RECEIVE_DATA   (GALRCD)			21-Jan-1985 13:44:41	STAR:<SNA.TAPE2.AI.SOURCE>SAIDLF.B36.1 (4)

;   0534  4	              local COUNT;
;   0535  4	
;   0536  4	              COUNT = IO_BUFFER_SIZE;
;   0537  4	              if not GAD$RECEIVE_DATA (.PORT[PCB_JFN], COUNT, .POINTER)
;   0538  4	              then RETURN_ERROR (AE_NCM); ! No communication error
;   0539  4	              GAP$I_DATA (.PORT, .POINTER, .COUNT);
;   0540  4	              PORT[PCB_DATA] = $FALSE;
;   0541  3	              end;
;   0542  3	
;   0543  3	         return;
;   0544  2	         end;
;   0545  2	
;   0546  2	    ! If user is ready to receive any type of data, then proceed normally
;   0547  2	
;   0548  2	    if not .DATA_BASE[UDB_DATA_AVAILABLE]
;   0549  3	    then begin
;   0550  3	         local COUNT;
;   0551  3	
;   0552  3	         COUNT = IO_BUFFER_SIZE;
;   0553  3	         if not GAD$RECEIVE_DATA (.PORT[PCB_JFN], COUNT, .POINTER)
;   0554  3	         then RETURN_ERROR (AE_NCM);
;   0555  3	         GAP$I_PROTOCOL_TYPE (.PORT, .POINTER, .COUNT);
;   0556  3	
;   0557  3	         return;
;   0558  2	         end;
;   0559  2	
;   0560  2	    ! If the user is not quite ready, then check for the type of data
;   0561  2	    ! coming in. If the message does not require buffering then proceed,
;   0562  2	    ! otherwise flag and wait for next time.
;   0563  2	
;   0564  2	    if not GAD$PROTOCOL_TYPE (.PORT[PCB_JFN], TYPE)
;   0565  2	    then return;
;   0566  2	
;   0567  2	    if .TYPE eql AP_NORMAL_DATA         ! If data packet then set
;   0568  2	    then PORT[PCB_DATA] = $TRUE         ! flag and wait for next time
;   0569  3	    else begin                          ! Otherwise read entire packet
;   0570  3	         local COUNT;
;   0571  3	
;   0572  3	         COUNT = IO_BUFFER_SIZE;        ! Read in the rest of the message
;   0573  3	         if not GAD$RECEIVE_DATA (.PORT[PCB_JFN], COUNT, .POINTER)
;   0574  3	         then RETURN_ERROR (AE_NCM);
;   0575  3	
;   0576  3	         selectone .TYPE of
;   0577  3	             set
;   0578  3	
;   0579  3	        [AP_BINDDATA]:
;   0580  3	            (GAP$I_BINDDATA (.PORT, .POINTER, (.COUNT)));
;   0581  3	
;   0582  3	       	[AP_FLUSH_BUF]:               ! 6
;   0583  3		    (GAP$I_FLUSH_BUF (.PORT));
;   0584  3	
;   0585  3		[AP_RECON_PEND]:              ! 7
SAIDLF		SNA GATEWAY ACCESS DECNET LINK FUNCTIONS	13-Feb-1985 13:32:58	TOPS-20 Bliss-36 4A(225)	    Page  12
Version 1.0	GAL$RECEIVE_DATA   (GALRCD)			21-Jan-1985 13:44:41	STAR:<SNA.TAPE2.AI.SOURCE>SAIDLF.B36.1 (4)

;   0586  3		    (GAP$I_RECON_PEND (.PORT, .POINTER));
;   0587  3	
;   0588  3	             tes;
;   0589  2	         end;
;   0590  2	
;   0591  1	    end;                                ! End of GAL$RECEIVE_DATA


GALRCD: PUSH	SP,AC13				; SP,AC13				400015' 261 17 0 00 000013		0482
	PUSH	SP,AC14				; SP,AC14				400016' 261 17 0 00 000014
	PUSH	SP,AC16				; SP,AC16				400017' 261 17 0 00 000016
	ADJSP	SP,4				; SP,4					400020' 105 17 0 00 000004
	MOVE	AC16,-10(SP)			; AC16,PORT				400021' 200 16 0 17 777770		0520
	HRRZ	AC1,3(AC16)			; AC1,3(AC16)				400022' 550 01 0 16 000003
	MOVEI	AC5,-1(AC1)			; AC5,-1(AC1)				400023' 201 05 0 01 777777
	HRLI	AC5,41000			; AC5,41000				400024' 505 05 0 00 041000
	MOVE	AC13,AC5			; POINTER,AC5				400025' 200 13 0 00 000005
	SETZB	AC1,AC2				; AC1,AC2				400026' 403 01 0 00 000002		0521
	MOVEI	AC4,6654			; AC4,6654				400027' 201 04 0 00 006654
	MOVE	AC5,AC13			; AC5,POINTER				400030' 200 05 0 00 000013
	EXTEND	AC1,C.1				; AC1,C.1				400031' 123 01 0 00 400176'
	JFCL					; 					400032' 255 00 0 00 000000
	HLRZ	AC14,2(AC16)			; DATA_BASE,2(AC16)			400033' 554 14 0 16 000002		0522
	MOVSI	AC1,2				; AC1,2					400034' 205 01 0 00 000002		0530
	TDNN	AC1,0(AC16)			; AC1,0(AC16)				400035' 616 01 0 16 000000
	JRST	L.2				; L.2					400036' 254 00 0 00 400064'
	MOVEI	AC1,2				; AC1,2					400037' 201 01 0 00 000002		0532
	TDNE	AC1,0(AC14)			; AC1,0(DATA_BASE)			400040' 612 01 0 14 000000
	JRST	L.10				; L.10					400041' 254 00 0 00 400171'
	MOVEI	AC1,6654			; AC1,6654				400042' 201 01 0 00 006654		0536
	MOVEM	AC1,0(SP)			; AC1,COUNT				400043' 202 01 0 17 000000
	LDB	AC1,C.2				; AC1,[POINT 9,0(AC16),35]  <0,9>	400044' 135 01 0 00 400200'		0537
	PUSH	SP,AC1				; SP,AC1				400045' 261 17 0 00 000001
	MOVEI	AC1,-1(SP)			; AC1,COUNT				400046' 201 01 0 17 777777
	PUSH	SP,AC1				; SP,AC1				400047' 261 17 0 00 000001
	PUSH	SP,AC13				; SP,POINTER				400050' 261 17 0 00 000013
	PUSHJ	SP,GADRCV			; SP,GADRCV				400051' 260 17 0 00 000000*
	ADJSP	SP,-3				; SP,-3					400052' 105 17 0 00 777775
	TRNN	AC1,1				; AC1,1					400053' 606 01 0 00 000001
	JRST	L.5				; L.5					400054' 254 00 0 00 400140'
	PUSH	SP,AC16				; SP,AC16				400055' 261 17 0 00 000016		0539
	PUSH	SP,AC13				; SP,POINTER				400056' 261 17 0 00 000013
	PUSH	SP,-2(SP)			; SP,COUNT				400057' 261 17 0 17 777776
	PUSHJ	SP,GPIDAT			; SP,GPIDAT				400060' 260 17 0 00 000000*
	MOVSI	AC1,2				; AC1,2					400061' 205 01 0 00 000002		0540
	ANDCAM	AC1,0(AC16)			; AC1,0(AC16)				400062' 412 01 0 16 000000
	JRST	L.7				; L.7					400063' 254 00 0 00 400153'
L.2:	MOVEI	AC1,2				; AC1,2					400064' 201 01 0 00 000002		0548
	TDNE	AC1,0(AC14)			; AC1,0(DATA_BASE)			400065' 612 01 0 14 000000
	JRST	L.3				; L.3					400066' 254 00 0 00 400107'
	MOVEI	AC1,6654			; AC1,6654				400067' 201 01 0 00 006654		0552
	MOVEM	AC1,-1(SP)			; AC1,COUNT				400070' 202 01 0 17 777777
SAIDLF		SNA GATEWAY ACCESS DECNET LINK FUNCTIONS	13-Feb-1985 13:32:58	TOPS-20 Bliss-36 4A(225)	    Page  13
Version 1.0	GAL$RECEIVE_DATA   (GALRCD)			21-Jan-1985 13:44:41	STAR:<SNA.TAPE2.AI.SOURCE>SAIDLF.B36.1 (4)

	LDB	AC1,C.2				; AC1,[POINT 9,0(AC16),35]  <0,9>	400071' 135 01 0 00 400200'		0553
	PUSH	SP,AC1				; SP,AC1				400072' 261 17 0 00 000001
	MOVEI	AC1,-2(SP)			; AC1,COUNT				400073' 201 01 0 17 777776
	PUSH	SP,AC1				; SP,AC1				400074' 261 17 0 00 000001
	PUSH	SP,AC13				; SP,POINTER				400075' 261 17 0 00 000013
	PUSHJ	SP,GADRCV			; SP,GADRCV				400076' 260 17 0 00 000000*
	ADJSP	SP,-3				; SP,-3					400077' 105 17 0 00 777775
	TRNN	AC1,1				; AC1,1					400100' 606 01 0 00 000001
	JRST	L.5				; L.5					400101' 254 00 0 00 400140'
	PUSH	SP,AC16				; SP,AC16				400102' 261 17 0 00 000016		0555
	PUSH	SP,AC13				; SP,POINTER				400103' 261 17 0 00 000013
	PUSH	SP,-3(SP)			; SP,COUNT				400104' 261 17 0 17 777775
	PUSHJ	SP,GPITYP			; SP,GPITYP				400105' 260 17 0 00 000000*
	JRST	L.7				; L.7					400106' 254 00 0 00 400153'
L.3:	LDB	AC1,C.2				; AC1,[POINT 9,0(AC16),35]  <0,9>	400107' 135 01 0 00 400200'		0564
	PUSH	SP,AC1				; SP,AC1				400110' 261 17 0 00 000001
	MOVEI	AC1,-3(SP)			; AC1,TYPE				400111' 201 01 0 17 777775
	PUSH	SP,AC1				; SP,AC1				400112' 261 17 0 00 000001
	PUSHJ	SP,GADTYP			; SP,GADTYP				400113' 260 17 0 00 000000*
	ADJSP	SP,-2				; SP,-2					400114' 105 17 0 00 777776
	TRNN	AC1,1				; AC1,1					400115' 606 01 0 00 000001
	JRST	L.10				; L.10					400116' 254 00 0 00 400171'		0565
	MOVE	AC14,-2(SP)			; AC14,TYPE				400117' 200 14 0 17 777776		0567
	CAIE	AC14,5				; AC14,5				400120' 302 14 0 00 000005
	JRST	L.4				; L.4					400121' 254 00 0 00 400125'
	MOVSI	AC1,2				; AC1,2					400122' 205 01 0 00 000002		0568
	IORM	AC1,0(AC16)			; AC1,0(AC16)				400123' 436 01 0 16 000000
	JRST	L.10				; L.10					400124' 254 00 0 00 400171'		0567
L.4:	MOVEI	AC1,6654			; AC1,6654				400125' 201 01 0 00 006654		0572
	MOVEM	AC1,-3(SP)			; AC1,COUNT				400126' 202 01 0 17 777775
	LDB	AC1,C.2				; AC1,[POINT 9,0(AC16),35]  <0,9>	400127' 135 01 0 00 400200'		0573
	PUSH	SP,AC1				; SP,AC1				400130' 261 17 0 00 000001
	MOVEI	AC1,-4(SP)			; AC1,COUNT				400131' 201 01 0 17 777774
	PUSH	SP,AC1				; SP,AC1				400132' 261 17 0 00 000001
	PUSH	SP,AC13				; SP,POINTER				400133' 261 17 0 00 000013
	PUSHJ	SP,GADRCV			; SP,GADRCV				400134' 260 17 0 00 000000*
	ADJSP	SP,-3				; SP,-3					400135' 105 17 0 00 777775
	TRNE	AC1,1				; AC1,1					400136' 602 01 0 00 000001
	JRST	L.6				; L.6					400137' 254 00 0 00 400145'
L.5:	MOVEI	AC1,7				; AC1,7					400140' 201 01 0 00 000007		0574
	DPB	AC1,C.3				; AC1,[POINT 9,0(AC16),26]  <9,9>	400141' 137 01 0 00 400201'
	MOVEI	AC1,40				; AC1,40				400142' 201 01 0 00 000040
	HRLM	AC1,1(AC16)			; AC1,1(AC16)				400143' 506 01 0 16 000001
	JRST	L.10				; L.10					400144' 254 00 0 00 400171'
L.6:	CAIE	AC14,3				; AC14,3				400145' 302 14 0 00 000003		0579
	JRST	L.8				; L.8					400146' 254 00 0 00 400155'
	PUSH	SP,AC16				; SP,AC16				400147' 261 17 0 00 000016		0580
	PUSH	SP,AC13				; SP,POINTER				400150' 261 17 0 00 000013
	PUSH	SP,-5(SP)			; SP,COUNT				400151' 261 17 0 17 777773
	PUSHJ	SP,GPIBIN			; SP,GPIBIN				400152' 260 17 0 00 000000*
L.7:	ADJSP	SP,-3				; SP,-3					400153' 105 17 0 00 777775
	JRST	L.10				; L.10					400154' 254 00 0 00 400171'		0576
SAIDLF		SNA GATEWAY ACCESS DECNET LINK FUNCTIONS	13-Feb-1985 13:32:58	TOPS-20 Bliss-36 4A(225)	    Page  14
Version 1.0	GAL$RECEIVE_DATA   (GALRCD)			21-Jan-1985 13:44:41	STAR:<SNA.TAPE2.AI.SOURCE>SAIDLF.B36.1 (4)

L.8:	CAIE	AC14,6				; AC14,6				400155' 302 14 0 00 000006		0582
	JRST	L.9				; L.9					400156' 254 00 0 00 400163'
	PUSH	SP,AC16				; SP,AC16				400157' 261 17 0 00 000016		0583
	PUSHJ	SP,GPIFLB			; SP,GPIFLB				400160' 260 17 0 00 000000*
	ADJSP	SP,-1				; SP,-1					400161' 105 17 0 00 777777
	JRST	L.10				; L.10					400162' 254 00 0 00 400171'		0576
L.9:	CAIE	AC14,7				; AC14,7				400163' 302 14 0 00 000007		0585
	JRST	L.10				; L.10					400164' 254 00 0 00 400171'
	PUSH	SP,AC16				; SP,AC16				400165' 261 17 0 00 000016		0586
	PUSH	SP,AC13				; SP,POINTER				400166' 261 17 0 00 000013
	PUSHJ	SP,GPIRCP			; SP,GPIRCP				400167' 260 17 0 00 000000*
	ADJSP	SP,-2				; SP,-2					400170' 105 17 0 00 777776
L.10:	ADJSP	SP,-4				; SP,-4					400171' 105 17 0 00 777774		0482
	POP	SP,AC16				; SP,AC16				400172' 262 17 0 00 000016
	POP	SP,AC14				; SP,AC14				400173' 262 17 0 00 000014
	POP	SP,AC13				; SP,AC13				400174' 262 17 0 00 000013
	POPJ	SP,				; SP,					400175' 263 17 0 00 000000
C.1:	MOVSLJ					; 					400176' 016 00 0 00 000000
	EXP	0				; 0					400177' 000000	000000
C.2:	POINT	9,0(AC16),35			; 9,0(AC16),35				400200' 00 11 0 16 000000
C.3:	POINT	9,0(AC16),26			; 9,0(AC16),26				400201' 11 11 0 16 000000

; Routine Size:  117 words


;   0592  1	
SAIDLF		SNA GATEWAY ACCESS DECNET LINK FUNCTIONS	13-Feb-1985 13:32:58	TOPS-20 Bliss-36 4A(225)	    Page  15
Version 1.0	GAL$RECEIVE_INTERRUPT   (GALRCI)		21-Jan-1985 13:44:41	STAR:<SNA.TAPE2.AI.SOURCE>SAIDLF.B36.1 (5)

;   0593  1	%routine ('GAL$RECEIVE_INTERRUPT', PORT: ref PORT_CONTROL_BLOCK) : novalue =
;   0594  1	
;   0595  1	!++
;   0596  1	! FUNCTIONAL DESCRIPTION:
;   0597  1	!
;   0598  1	!       Function reads data from the DECnet logical link, determines the type,
;   0599  1	!       buffers them or takes actions defined by the state machine.
;   0600  1	!
;   0601  1	! FORMAL PARAMETERS:
;   0602  1	!
;   0603  1	!	PORT            The port data base.
;   0604  1	!
;   0605  1	! IMPLICIT INPUTS:
;   0606  1	!
;   0607  1	!	none
;   0608  1	!
;   0609  1	! IMPLICIT OUTPUTS:
;   0610  1	!
;   0611  1	!	none
;   0612  1	!
;   0613  1	! COMPLETION CODES:
;   0614  1	!
;   0615  1	!	none
;   0616  1	!
;   0617  1	! SIDE EFFECTS:
;   0618  1	!
;   0619  1	!	Actions are taken immediately, when the type of the received data
;   0620  1	!       packets are determined.
;   0621  1	!
;   0622  1	!--
;   0623  1	
;   0624  2	    begin
;   0625  2	
;   0626  2	    local
;   0627  2	        POINTER,
;   0628  2	        COUNT,
;   0629  2	        HEAD: ref RING_ENTRY,
;   0630  2	        DATA_BASE: ref USER_DATA_BASE;
;   0631  2	
;   0632  2	    DATA_BASE = .PORT[PCB_DATA_BASE];
;   0633  2	    HEAD = .PORT[PCB_INHEAD_BUFFER];
;   0634  2	
;   0635  2	    COUNT = INT_BUFFER_SIZE;
;   0636  2	
;   0637  2	    POINTER = ch$ptr (HEAD[DATA_BUFFER],,8);
;   0638  2	
;   0639  2	    if .HEAD[IN_USE_FLAG] eql 1
;   0640  2	    then RETURN_ERROR (AE_EDO);
;   0641  2	
;   0642  2	    if not GAD$RECEIVE_INTERRUPT (.PORT[PCB_JFN], COUNT, .POINTER)
;   0643  2	    then RETURN_ERROR (AE_NCM);                ! No communication error
;   0644  2	
SAIDLF		SNA GATEWAY ACCESS DECNET LINK FUNCTIONS	13-Feb-1985 13:32:58	TOPS-20 Bliss-36 4A(225)	    Page  16
Version 1.0	GAL$RECEIVE_INTERRUPT   (GALRCI)		21-Jan-1985 13:44:41	STAR:<SNA.TAPE2.AI.SOURCE>SAIDLF.B36.1 (5)

;   0645  2	    DATA_BASE[UDB_INTERRUPT_AVAILABLE] = $TRUE;
;   0646  2	    HEAD[DATA_LENGTH] = .COUNT;
;   0647  2	    HEAD[IN_USE_FLAG] = 1;
;   0648  2	    PORT[PCB_INTCNT] = .PORT[PCB_INTCNT] + 1;
;   0649  2	    PORT[PCB_INHEAD_BUFFER] = .HEAD[NEXT_RING_PTR];
;   0650  2	
;   0651  2	    return;
;   0652  2	         
;   0653  1	    end;                                ! End of GAL$RECEIVE_INTERRUPT


GALRCI: PUSH	SP,AC13				; SP,AC13				400202' 261 17 0 00 000013		0593
	PUSH	SP,AC14				; SP,AC14				400203' 261 17 0 00 000014
	PUSH	SP,AC16				; SP,AC16				400204' 261 17 0 00 000016
	ADJSP	SP,1				; SP,1					400205' 105 17 0 00 000001
	MOVE	AC14,-5(SP)			; AC14,PORT				400206' 200 14 0 17 777773		0632
	HLRZ	AC13,2(AC14)			; DATA_BASE,2(AC14)			400207' 554 13 0 14 000002
	HRRZ	AC16,4(AC14)			; HEAD,4(AC14)				400210' 550 16 0 14 000004		0633
	MOVEI	AC1,20				; AC1,20				400211' 201 01 0 00 000020		0635
	MOVEM	AC1,0(SP)			; AC1,COUNT				400212' 202 01 0 17 000000
	MOVEI	AC1,-1(AC16)			; AC1,-1(HEAD)				400213' 201 01 0 16 777777		0637
	HRLI	AC1,41000			; AC1,41000				400214' 505 01 0 00 041000
	MOVEI	AC2,1				; AC2,1					400215' 201 02 0 00 000001		0639
	CAME	AC2,4(AC16)			; AC2,4(HEAD)				400216' 312 02 0 16 000004
	JRST	L.11				; L.11					400217' 254 00 0 00 400225'
	MOVEI	AC2,7				; AC2,7					400220' 201 02 0 00 000007		0640
	DPB	AC2,C.4				; AC2,[POINT 9,0(AC14),26]  <9,9>	400221' 137 02 0 00 400263'
	MOVEI	AC2,400				; AC2,400				400222' 201 02 0 00 000400
	HRLM	AC2,1(AC14)			; AC2,1(AC14)				400223' 506 02 0 14 000001
	JRST	L.13				; L.13					400224' 254 00 0 00 400256'
L.11:	LDB	AC2,C.5				; AC2,[POINT 9,0(AC14),35]  <0,9>	400225' 135 02 0 00 400264'		0642
	PUSH	SP,AC2				; SP,AC2				400226' 261 17 0 00 000002
	MOVEI	AC2,-1(SP)			; AC2,COUNT				400227' 201 02 0 17 777777
	PUSH	SP,AC2				; SP,AC2				400230' 261 17 0 00 000002
	PUSH	SP,AC1				; SP,POINTER				400231' 261 17 0 00 000001
	PUSHJ	SP,GADRCI			; SP,GADRCI				400232' 260 17 0 00 000000*
	ADJSP	SP,-3				; SP,-3					400233' 105 17 0 00 777775
	TRNE	AC1,1				; AC1,1					400234' 602 01 0 00 000001
	JRST	L.12				; L.12					400235' 254 00 0 00 400243'
	MOVEI	AC1,7				; AC1,7					400236' 201 01 0 00 000007		0643
	DPB	AC1,C.4				; AC1,[POINT 9,0(AC14),26]  <9,9>	400237' 137 01 0 00 400263'
	MOVEI	AC1,40				; AC1,40				400240' 201 01 0 00 000040
	HRLM	AC1,1(AC14)			; AC1,1(AC14)				400241' 506 01 0 14 000001
	JRST	L.13				; L.13					400242' 254 00 0 00 400256'
L.12:	MOVEI	AC1,10				; AC1,10				400243' 201 01 0 00 000010		0645
	IORM	AC1,0(AC13)			; AC1,0(DATA_BASE)			400244' 436 01 0 13 000000
	MOVE	AC1,0(SP)			; AC1,COUNT				400245' 200 01 0 17 000000		0646
	MOVEM	AC1,5(AC16)			; AC1,5(HEAD)				400246' 202 01 0 16 000005
	MOVEI	AC1,1				; AC1,1					400247' 201 01 0 00 000001		0647
	MOVEM	AC1,4(AC16)			; AC1,4(HEAD)				400250' 202 01 0 16 000004
	HRRE	AC1,1(AC14)			; AC1,1(AC14)				400251' 570 01 0 14 000001		0648
	ADDI	AC1,1				; AC1,1					400252' 271 01 0 00 000001
SAIDLF		SNA GATEWAY ACCESS DECNET LINK FUNCTIONS	13-Feb-1985 13:32:58	TOPS-20 Bliss-36 4A(225)	    Page  17
Version 1.0	GAL$RECEIVE_INTERRUPT   (GALRCI)		21-Jan-1985 13:44:41	STAR:<SNA.TAPE2.AI.SOURCE>SAIDLF.B36.1 (5)

	HRRM	AC1,1(AC14)			; AC1,1(AC14)				400253' 542 01 0 14 000001
	MOVE	AC1,6(AC16)			; AC1,6(HEAD)				400254' 200 01 0 16 000006		0649
	HRRM	AC1,4(AC14)			; AC1,4(AC14)				400255' 542 01 0 14 000004
L.13:	ADJSP	SP,-1				; SP,-1					400256' 105 17 0 00 777777		0593
	POP	SP,AC16				; SP,AC16				400257' 262 17 0 00 000016
	POP	SP,AC14				; SP,AC14				400260' 262 17 0 00 000014
	POP	SP,AC13				; SP,AC13				400261' 262 17 0 00 000013
	POPJ	SP,				; SP,					400262' 263 17 0 00 000000
C.4:	POINT	9,0(AC14),26			; 9,0(AC14),26				400263' 11 11 0 14 000000
C.5:	POINT	9,0(AC14),35			; 9,0(AC14),35				400264' 00 11 0 14 000000

; Routine Size:  51 words


;   0654  1	
SAIDLF		SNA GATEWAY ACCESS DECNET LINK FUNCTIONS	13-Feb-1985 13:32:58	TOPS-20 Bliss-36 4A(225)	    Page  18
Version 1.0	GAL$LINK_SERVICE   (GALSRV)			21-Jan-1985 13:44:41	STAR:<SNA.TAPE2.AI.SOURCE>SAIDLF.B36.1 (6)

;   0655  1	%global_routine ('GAL$LINK_SERVICE', PORT: ref PORT_CONTROL_BLOCK) : novalue =
;   0656  1	
;   0657  1	!++
;   0658  1	! FUNCTIONAL DESCRIPTION:
;   0659  1	!
;   0660  1	!       Function service DECnet logical link for a particular port
;   0661  1	!
;   0662  1	! FORMAL PARAMETERS:
;   0663  1	!
;   0664  1	!	PORT            The port data base.
;   0665  1	!
;   0666  1	! IMPLICIT INPUTS:
;   0667  1	!
;   0668  1	!	none
;   0669  1	!
;   0670  1	! IMPLICIT OUTPUTS:
;   0671  1	!
;   0672  1	!	none
;   0673  1	!
;   0674  1	! COMPLETION CODES:
;   0675  1	!
;   0676  1	!	none
;   0677  1	!
;   0678  1	! SIDE EFFECTS:
;   0679  1	!
;   0680  1	!	none
;   0681  1	!
;   0682  1	!--
;   0683  1	
;   0684  2	    begin
;   0685  2	
;   0686  2	    local
;   0687  2	        POINTER,
;   0688  2	        COUNT,
;   0689  2	        ERROR,
;   0690  2	        SENSE,
;   0691  2	        STATUS,
;   0692  2	        DATA_BASE: ref USER_DATA_BASE;
;   0693  2	
;   0694  2	    POINTER = ch$ptr (.PORT[PCB_INPUT_BUFFER],,8); ! Get pointer to link buffer
;   0695  2	    ch$fill (0, IO_BUFFER_SIZE, .POINTER);
;   0696  2	    ERROR = $FALSE;                     ! Assume no error
;   0697  2	
;   0698  2	    DATA_BASE = .PORT[PCB_DATA_BASE];   ! Get user data base address
;   0699  2	
;   0700  2	    ! Check the status of the logical link.
;   0701  2	
;   0702  2	    GAD$LINK_STATUS (.PORT[PCB_JFN], STATUS);
;   0703  2	
;   0704  2	    ! If the link has been aborted, save the optional data if any
;   0705  2	    ! for the user to read later
;   0706  2	
SAIDLF		SNA GATEWAY ACCESS DECNET LINK FUNCTIONS	13-Feb-1985 13:32:58	TOPS-20 Bliss-36 4A(225)	    Page  19
Version 1.0	GAL$LINK_SERVICE   (GALSRV)			21-Jan-1985 13:44:41	STAR:<SNA.TAPE2.AI.SOURCE>SAIDLF.B36.1 (6)

;   0707  3	    if (.STATUS<$(mo_abt)> or .STATUS<$(mo_syn)>) 
;   0708  3	    then begin
;   0709  3	
;   0710  3	         local
;   0711  3	         TMP,
;   0712  3	         LEN,
;   0713  3	         JFN,
;   0714  3	         PTR;
;   0715  3	
;   0716  3	         PTR = ch$ptr (DATA_BASE[UDB_ABORT_DATA],,8);
;   0717  3	         JFN = .PORT[PCB_JFN];
;   0718  3	         jsys_mtopr (.JFN, $morls; ,, TMP);
;   0719  3	         jsys_mtopr (.JFN, $morda, .PTR; ,,, LEN);
;   0720  3	         DATA_BASE[UDB_ABORT_LENGTH] = .LEN;
;   0721  3	         DATA_BASE[UDB_ABORT_STATUS] = .TMP;
;   0722  3	
;   0723  2	         end;                                            
;   0724  2	
;   0725  2	    ! If the port was ABORTED, or in ERROR state, then it is normal that
;   0726  2	    ! the DECnet link does not exist any more, so return normally.
;   0727  2	    ! Otherwise, check for error code in the right half of the status word.
;   0728  2	
;   0729  3	    if begin
;   0730  3	       selectone .PORT[PCB_STATE] of
;   0731  3	           set
;   0732  3	           [AS_ABD,                     ! ABORTED
;   0733  3	            AS_ABG,                     ! ABORTING
;   0734  3	            AS_ERR]:                    ! ERROR
;   0735  3	               $TRUE;
;   0736  3	
;   0737  3	           [otherwise]:
;   0738  3	               $FALSE;
;   0739  3	           tes
;   0740  3	       end
;   0741  3	    then begin
;   0742  3	         if .STATUS<$(mo_abt)> and .STATUS<$(mo_lwc)>
;   0743  3	         then return
;   0744  3	         else ERROR = $TRUE;
;   0745  2	         end;
;   0746  2	
;   0747  2	    ! Return error if the logical link is aborted or closed without user's
;   0748  2	    ! consent or knowledge
;   0749  2	
;   0750  2	    if (.STATUS<$(mo_abt)> or .STATUS<$(mo_syn)>) and not .ERROR
;   0751  2	    then RETURN_ERROR (AE_NCM);
;   0752  2	
;   0753  2	    ! If interrupt available on the logical link then process interrupt.
;   0754  2	    ! If the message type is not expected, then return error.
;   0755  2	
;   0756  2	    if .STATUS<$(mo_int)>
;   0757  2	    then GAL$RECEIVE_INTERRUPT (.PORT);
;   0758  2	
SAIDLF		SNA GATEWAY ACCESS DECNET LINK FUNCTIONS	13-Feb-1985 13:32:58	TOPS-20 Bliss-36 4A(225)	    Page  20
Version 1.0	GAL$LINK_SERVICE   (GALSRV)			21-Jan-1985 13:44:41	STAR:<SNA.TAPE2.AI.SOURCE>SAIDLF.B36.1 (6)

;   0759  2	    ! If the data available on the logical link then process data
;   0760  2	
;   0761  2	    if .STATUS<$(mo_eom)>
;   0762  2	    then GAL$RECEIVE_DATA (.PORT);
;   0763  2	
;   0764  3	    if (not jsys_sibe (.PORT[PCB_JFN]; , COUNT))
;   0765  3	    and (.COUNT gtr 0)
;   0766  2	    then GAL$RECEIVE_DATA (.PORT);
;   0767  2	
;   0768  2	    ! If the port state and the link state is not consistent,
;   0769  2	    ! (i.e., if the port state is changed to ERROR because of bad data of
;   0770  2	    ! bad link status, or if the port state is already CLEARED or ERROR but
;   0771  2	    ! the link is not shutdown) then close it.
;   0772  2	
;   0773  2	    SENSE = 0;                                         
;   0774  2	
;   0775  2	    if ((.PORT[PCB_STATE] eql AS_ABD) and not .ERROR) or .ERROR
;   0776  2	    then if not GAL$TERMINATE (.PORT[PCB_JFN], .SENSE, AR_UND)
;   0777  2	         then GAD$ABORT_LINK (.PORT[PCB_JFN]);
;   0778  2	
;   0779  2	    return;
;   0780  1	    end;                                ! End of GAL$LINK_SERVICE


GALSRV::PUSH	SP,AC11				; SP,AC11				400265' 261 17 0 00 000011		0655
	PUSH	SP,AC12				; SP,AC12				400266' 261 17 0 00 000012
	PUSH	SP,AC13				; SP,AC13				400267' 261 17 0 00 000013
	PUSH	SP,AC14				; SP,AC14				400270' 261 17 0 00 000014
	PUSH	SP,AC16				; SP,AC16				400271' 261 17 0 00 000016
	ADJSP	SP,1				; SP,1					400272' 105 17 0 00 000001
	MOVE	AC14,-7(SP)			; AC14,PORT				400273' 200 14 0 17 777771		0694
	HRRZ	AC1,3(AC14)			; AC1,3(AC14)				400274' 550 01 0 14 000003
	MOVEI	AC5,-1(AC1)			; AC5,-1(AC1)				400275' 201 05 0 01 777777
	HRLI	AC5,41000			; AC5,41000				400276' 505 05 0 00 041000
	SETZB	AC1,AC2				; AC1,AC2				400277' 403 01 0 00 000002		0695
	MOVEI	AC4,6654			; AC4,6654				400300' 201 04 0 00 006654
	EXTEND	AC1,C.1				; AC1,C.1				400301' 123 01 0 00 400176'
	JFCL					; 					400302' 255 00 0 00 000000
	SETZ	AC13,				; ERROR,				400303' 400 13 0 00 000000		0696
	HLRZ	AC16,2(AC14)			; DATA_BASE,2(AC14)			400304' 554 16 0 14 000002		0698
	LDB	AC1,C.5				; AC1,[POINT 9,0(AC14),35]  <0,9>	400305' 135 01 0 00 400264'		0702
	PUSH	SP,AC1				; SP,AC1				400306' 261 17 0 00 000001
	MOVEI	AC1,-1(SP)			; AC1,STATUS				400307' 201 01 0 17 777777
	PUSH	SP,AC1				; SP,AC1				400310' 261 17 0 00 000001
	PUSHJ	SP,GADSTA			; SP,GADSTA				400311' 260 17 0 00 000000*
	MOVSI	AC1,14000			; AC1,14000				400312' 205 01 0 00 014000		0707
	TDNN	AC1,-2(SP)			; AC1,STATUS				400313' 616 01 0 17 777776
	JRST	L.16				; L.16					400314' 254 00 0 00 400335'
	MOVEI	AC3,47(AC16)			; AC3,47(DATA_BASE)			400315' 201 03 0 16 000047		0716
	HRLI	AC3,41000			; AC3,41000				400316' 505 03 0 00 041000
	MOVE	AC11,AC3			; PTR,AC3				400317' 200 11 0 00 000003
	LDB	AC12,C.5			; JFN,[POINT 9,0(AC14),35]  <0,9>	400320' 135 12 0 00 400264'		0717
SAIDLF		SNA GATEWAY ACCESS DECNET LINK FUNCTIONS	13-Feb-1985 13:32:58	TOPS-20 Bliss-36 4A(225)	    Page  21
Version 1.0	GAL$LINK_SERVICE   (GALSRV)			21-Jan-1985 13:44:41	STAR:<SNA.TAPE2.AI.SOURCE>SAIDLF.B36.1 (6)

	MOVE	AC1,AC12			; AC1,JFN				400321' 200 01 0 00 000012		0718
	MOVEI	AC2,25				; AC2,25				400322' 201 02 0 00 000025
	JSYS	77				; 77					400323' 104 00 0 00 000077
	JUMP	16,L.14				; 16,L.14				400324' 320 16 0 00 400325'
L.14:	MOVE	AC5,AC3				; AC5,AC3				400325' 200 05 0 00 000003
	MOVE	AC1,AC12			; AC1,JFN				400326' 200 01 0 00 000012		0719
	MOVEI	AC2,33				; AC2,33				400327' 201 02 0 00 000033
	MOVE	AC3,AC11			; AC3,PTR				400330' 200 03 0 00 000011
	JSYS	77				; 77					400331' 104 00 0 00 000077
	JUMP	16,L.15				; 16,L.15				400332' 320 16 0 00 400333'
L.15:	HRRM	AC4,3(AC16)			; LEN,3(DATA_BASE)			400333' 542 04 0 16 000003		0720
	MOVEM	AC5,4(AC16)			; TMP,4(DATA_BASE)			400334' 202 05 0 16 000004		0721
L.16:	LDB	AC1,C.4				; AC1,[POINT 9,0(AC14),26]  <9,9>	400335' 135 01 0 00 400263'		0730
	CAIL	AC1,6				; AC1,6					400336' 301 01 0 00 000006		0732
	CAILE	AC1,10				; AC1,10				400337' 303 01 0 00 000010
	JRST	L.18				; L.18					400340' 254 00 0 00 400350'		0737
	MOVSI	AC1,10000			; AC1,10000				400341' 205 01 0 00 010000		0742
	TDNN	AC1,-2(SP)			; AC1,STATUS				400342' 616 01 0 17 777776
	JRST	L.17				; L.17					400343' 254 00 0 00 400347'
	MOVSI	AC1,1000			; AC1,1000				400344' 205 01 0 00 001000
	TDNE	AC1,-2(SP)			; AC1,STATUS				400345' 612 01 0 17 777776
	JRST	L.27				; L.27					400346' 254 00 0 00 400432'
L.17:	MOVEI	AC13,1				; ERROR,1				400347' 201 13 0 00 000001		0744
L.18:	MOVSI	AC1,10000			; AC1,10000				400350' 205 01 0 00 010000		0750
	TDNE	AC1,-2(SP)			; AC1,STATUS				400351' 612 01 0 17 777776
	JRST	L.19				; L.19					400352' 254 00 0 00 400356'
	MOVSI	AC1,4000			; AC1,4000				400353' 205 01 0 00 004000
	TDNN	AC1,-2(SP)			; AC1,STATUS				400354' 616 01 0 17 777776
	JRST	L.20				; L.20					400355' 254 00 0 00 400365'
L.19:	TRNE	AC13,1				; ERROR,1				400356' 602 13 0 00 000001
	JRST	L.20				; L.20					400357' 254 00 0 00 400365'
	MOVEI	AC1,7				; AC1,7					400360' 201 01 0 00 000007		0751
	DPB	AC1,C.4				; AC1,[POINT 9,0(AC14),26]  <9,9>	400361' 137 01 0 00 400263'
	MOVEI	AC1,40				; AC1,40				400362' 201 01 0 00 000040
	HRLM	AC1,1(AC14)			; AC1,1(AC14)				400363' 506 01 0 14 000001
	JRST	L.27				; L.27					400364' 254 00 0 00 400432'
L.20:	MOVSI	AC1,2000			; AC1,2000				400365' 205 01 0 00 002000		0756
	TDNN	AC1,-2(SP)			; AC1,STATUS				400366' 616 01 0 17 777776
	JRST	L.21				; L.21					400367' 254 00 0 00 400372'
	MOVEM	AC14,0(SP)			; AC14,0(SP)				400370' 202 14 0 17 000000		0757
	PUSHJ	SP,GALRCI			; SP,GALRCI				400371' 260 17 0 00 400202'
L.21:	MOVSI	AC1,20000			; AC1,20000				400372' 205 01 0 00 020000		0761
	TDNN	AC1,-2(SP)			; AC1,STATUS				400373' 616 01 0 17 777776
	JRST	L.22				; L.22					400374' 254 00 0 00 400377'
	MOVEM	AC14,0(SP)			; AC14,0(SP)				400375' 202 14 0 17 000000		0762
	PUSHJ	SP,GALRCD			; SP,GALRCD				400376' 260 17 0 00 400015'
L.22:	LDB	AC1,C.5				; AC1,[POINT 9,0(AC14),35]  <0,9>	400377' 135 01 0 00 400264'		0764
	JSYS	102				; 102					400400' 104 00 0 00 000102
	JRST	L.23				; L.23					400401' 254 00 0 00 400403'
	JRST	L.24				; L.24					400402' 254 00 0 00 400406'
L.23:	JUMPLE	AC2,L.24			; COUNT,L.24				400403' 323 02 0 00 400406'		0765
	MOVEM	AC14,0(SP)			; AC14,0(SP)				400404' 202 14 0 17 000000		0766
SAIDLF		SNA GATEWAY ACCESS DECNET LINK FUNCTIONS	13-Feb-1985 13:32:58	TOPS-20 Bliss-36 4A(225)	    Page  22
Version 1.0	GAL$LINK_SERVICE   (GALSRV)			21-Jan-1985 13:44:41	STAR:<SNA.TAPE2.AI.SOURCE>SAIDLF.B36.1 (6)

	PUSHJ	SP,GALRCD			; SP,GALRCD				400405' 260 17 0 00 400015'
L.24:	SETZ	AC1,				; SENSE,				400406' 400 01 0 00 000000		0773
	LDB	AC2,C.4				; AC2,[POINT 9,0(AC14),26]  <9,9>	400407' 135 02 0 00 400263'		0775
	CAIE	AC2,7				; AC2,7					400410' 302 02 0 00 000007
	JRST	L.25				; L.25					400411' 254 00 0 00 400414'
	TRNN	AC13,1				; ERROR,1				400412' 606 13 0 00 000001
	JRST	L.26				; L.26					400413' 254 00 0 00 400416'
L.25:	TRNN	AC13,1				; ERROR,1				400414' 606 13 0 00 000001
	JRST	L.27				; L.27					400415' 254 00 0 00 400432'
L.26:	LDB	AC2,C.5				; AC2,[POINT 9,0(AC14),35]  <0,9>	400416' 135 02 0 00 400264'		0776
	PUSH	SP,AC2				; SP,AC2				400417' 261 17 0 00 000002
	PUSH	SP,AC1				; SP,SENSE				400420' 261 17 0 00 000001
	PUSH	SP,C.6				; SP,[0]				400421' 261 17 0 00 400441'
	PUSHJ	SP,GALTER			; SP,GALTER				400422' 260 17 0 00 000000V
	ADJSP	SP,-3				; SP,-3					400423' 105 17 0 00 777775
	TRNE	AC1,1				; AC1,1					400424' 602 01 0 00 000001
	JRST	L.27				; L.27					400425' 254 00 0 00 400432'
	LDB	AC1,C.5				; AC1,[POINT 9,0(AC14),35]  <0,9>	400426' 135 01 0 00 400264'		0777
	PUSH	SP,AC1				; SP,AC1				400427' 261 17 0 00 000001
	PUSHJ	SP,GADABT			; SP,GADABT				400430' 260 17 0 00 000000*
	ADJSP	SP,-1				; SP,-1					400431' 105 17 0 00 777777
L.27:	ADJSP	SP,-3				; SP,-3					400432' 105 17 0 00 777775		0779
	POP	SP,AC16				; SP,AC16				400433' 262 17 0 00 000016		0655
	POP	SP,AC14				; SP,AC14				400434' 262 17 0 00 000014
	POP	SP,AC13				; SP,AC13				400435' 262 17 0 00 000013
	POP	SP,AC12				; SP,AC12				400436' 262 17 0 00 000012
	POP	SP,AC11				; SP,AC11				400437' 262 17 0 00 000011
	POPJ	SP,				; SP,					400440' 263 17 0 00 000000
C.6:	EXP	0				; 0					400441' 000000	000000

; Routine Size:  109 words


;   0781  1	
SAIDLF		SNA GATEWAY ACCESS DECNET LINK FUNCTIONS	13-Feb-1985 13:32:58	TOPS-20 Bliss-36 4A(225)	    Page  23
Version 1.0	GAL$TERMINATE   (GALTER)			21-Jan-1985 13:44:41	STAR:<SNA.TAPE2.AI.SOURCE>SAIDLF.B36.1 (7)

;   0782  1	%global_routine ('GAL$TERMINATE', JFN, SENSE, REASON)  =
;   0783  1	
;   0784  1	!++
;   0785  1	! FUNCTIONAL DESCRIPTION:
;   0786  1	!
;   0787  1	!       Assemble outgoing clear protocol message
;   0788  1	!
;   0789  1	!	MSG: /REASON/SENSE/
;   0790  1	!
;   0791  1	! FORMAL PARAMETERS:
;   0792  1	!
;   0793  1	!      SENSE    A 4-byte IBM sense code.
;   0794  1	!      REASON   Reason for aborting the port.
;   0795  1	!      
;   0796  1	!
;   0797  1	! IMPLICIT INPUTS:
;   0798  1	!
;   0799  1	!	none
;   0800  1	!
;   0801  1	! IMPLICIT OUTPUTS:
;   0802  1	!
;   0803  1	!	none
;   0804  1	!
;   0805  1	! COMPLETION CODES:
;   0806  1	!
;   0807  1	!	none
;   0808  1	!
;   0809  1	! SIDE EFFECTS:
;   0810  1	!
;   0811  1	!	none
;   0812  1	!
;   0813  1	!--
;   0814  1	
;   0815  2	    begin
;   0816  2	
;   0817  2	    local
;   0818  2		LENGTH,
;   0819  2		BASE,
;   0820  2	        BUF: block [2],
;   0821  2		POINTER;
;   0822  2	
;   0823  2	    BASE = POINTER = ch$ptr (BUF,,8);
;   0824  2	
;   0825  2	    if (..REASON) neq 0
;   0826  2	    then
;   0827  2	    ch$move (1, ch$ptr (.REASON,,8), .POINTER)
;   0828  2	    else
;   0829  2	    ch$wchar_a (0, POINTER);
;   0830  2	
;   0831  2	    if (..SENSE) neq 0
;   0832  2	    then
;   0833  2	    ch$move (4, ch$ptr (.SENSE,,8), .POINTER)
SAIDLF		SNA GATEWAY ACCESS DECNET LINK FUNCTIONS	13-Feb-1985 13:32:58	TOPS-20 Bliss-36 4A(225)	    Page  24
Version 1.0	GAL$TERMINATE   (GALTER)			21-Jan-1985 13:44:41	STAR:<SNA.TAPE2.AI.SOURCE>SAIDLF.B36.1 (7)

;   0834  2	    else
;   0835  2	    ch$wchar_a (0, POINTER);
;   0836  2	
;   0837  2	    ! Get the length of protocol message
;   0838  2	
;   0839  2	    LENGTH = ch$diff (.POINTER, .BASE);
;   0840  2	
;   0841  2	    return     jsys_mtopr (.JFN, $moclz, .POINTER, .LENGTH);
;   0842  2	
;   0843  1	    end;                                ! End of GAL$TERMINATE


GALTER::PUSH	SP,AC16				; SP,AC16				400442' 261 17 0 00 000016		0782
	ADJSP	SP,2				; SP,2					400443' 105 17 0 00 000002
	MOVEI	AC5,-2(SP)			; AC5,BUF-1				400444' 201 05 0 17 777776		0823
	HRLI	AC5,41000			; AC5,41000				400445' 505 05 0 00 041000
	MOVE	AC16,AC5			; POINTER,AC5				400446' 200 16 0 00 000005
	MOVE	AC3,AC16			; BASE,POINTER				400447' 200 03 0 00 000016
	MOVE	AC1,-4(SP)			; AC1,REASON				400450' 200 01 0 17 777774		0825
	SKIPN	0(AC1)				; 0(AC1)				400451' 336 00 0 01 000000
	JRST	L.28				; L.28					400452' 254 00 0 00 400463'
	MOVEI	AC2,-1(AC1)			; AC2,-1(AC1)				400453' 201 02 0 01 777777		0827
	HRLI	AC2,41000			; AC2,41000				400454' 505 02 0 00 041000
	MOVEI	AC1,1				; AC1,1					400455' 201 01 0 00 000001
	MOVEI	AC4,1				; AC4,1					400456' 201 04 0 00 000001
	MOVE	AC5,AC16			; AC5,POINTER				400457' 200 05 0 00 000016
	EXTEND	AC1,C.7				; AC1,[MOVSLJ ]				400460' 123 01 0 00 400522'
	JFCL					; 					400461' 255 00 0 00 000000
	JRST	L.29				; L.29					400462' 254 00 0 00 400465'		0825
L.28:	SETZ	AC1,				; AC1,					400463' 400 01 0 00 000000		0829
	IDPB	AC1,AC16			; AC1,POINTER				400464' 136 01 0 00 000016
L.29:	MOVE	AC1,-5(SP)			; AC1,SENSE				400465' 200 01 0 17 777773		0831
	SKIPN	0(AC1)				; 0(AC1)				400466' 336 00 0 01 000000
	JRST	L.30				; L.30					400467' 254 00 0 00 400500'
	MOVEI	AC2,-1(AC1)			; AC2,-1(AC1)				400470' 201 02 0 01 777777		0833
	HRLI	AC2,41000			; AC2,41000				400471' 505 02 0 00 041000
	MOVEI	AC1,4				; AC1,4					400472' 201 01 0 00 000004
	MOVEI	AC4,4				; AC4,4					400473' 201 04 0 00 000004
	MOVE	AC5,AC16			; AC5,POINTER				400474' 200 05 0 00 000016
	EXTEND	AC1,C.7				; AC1,[MOVSLJ ]				400475' 123 01 0 00 400522'
	JFCL					; 					400476' 255 00 0 00 000000
	JRST	L.31				; L.31					400477' 254 00 0 00 400502'		0831
L.30:	SETZ	AC1,				; AC1,					400500' 400 01 0 00 000000		0835
	IDPB	AC1,AC16			; AC1,POINTER				400501' 136 01 0 00 000016
L.31:	PUSH	SP,AC16				; SP,POINTER				400502' 261 17 0 00 000016		0839
	PUSH	SP,AC3				; SP,BASE				400503' 261 17 0 00 000003
	PUSHJ	SP,CHDIF%			; SP,CHDIF%				400504' 260 17 0 00 000000*
	MOVE	AC4,AC1				; LENGTH,AC1				400505' 200 04 0 00 000001
	MOVE	AC1,-10(SP)			; AC1,JFN				400506' 200 01 0 17 777770		0841
	MOVEI	AC2,40				; AC2,40				400507' 201 02 0 00 000040
	MOVE	AC3,AC16			; AC3,POINTER				400510' 200 03 0 00 000016
	SETZ	AC5,				; AC5,					400511' 400 05 0 00 000000
SAIDLF		SNA GATEWAY ACCESS DECNET LINK FUNCTIONS	13-Feb-1985 13:32:58	TOPS-20 Bliss-36 4A(225)	    Page  25
Version 1.0	GAL$TERMINATE   (GALTER)			21-Jan-1985 13:44:41	STAR:<SNA.TAPE2.AI.SOURCE>SAIDLF.B36.1 (7)

	JSYS	77				; 77					400512' 104 00 0 00 000077
	JUMP	16,L.32				; 16,L.32				400513' 320 16 0 00 400515'
	MOVEI	AC5,1				; AC5,1					400514' 201 05 0 00 000001
L.32:	ADJSP	SP,-2				; SP,-2					400515' 105 17 0 00 777776
	MOVE	AC1,AC5				; AC1,AC5				400516' 200 01 0 00 000005		0815
	ADJSP	SP,-2				; SP,-2					400517' 105 17 0 00 777776		0782
	POP	SP,AC16				; SP,AC16				400520' 262 17 0 00 000016
	POPJ	SP,				; SP,					400521' 263 17 0 00 000000
C.7:	MOVSLJ					; 					400522' 016 00 0 00 000000

; Routine Size:  49 words


;   0844  1	
SAIDLF		SNA GATEWAY ACCESS DECNET LINK FUNCTIONS	13-Feb-1985 13:32:58	TOPS-20 Bliss-36 4A(225)	    Page  26
Version 1.0	GAL$REJECT   (GALREJ)				21-Jan-1985 13:44:41	STAR:<SNA.TAPE2.AI.SOURCE>SAIDLF.B36.1 (8)

;   0845  1	%global_routine ('GAL$REJECT', JFN, SENSE, REASON) : novalue =
;   0846  1	
;   0847  1	!++
;   0848  1	! FUNCTIONAL DESCRIPTION:
;   0849  1	!
;   0850  1	!       Assemble outgoing clear protocol message
;   0851  1	!
;   0852  1	!	MSG: /REASON/SENSE/
;   0853  1	!
;   0854  1	! FORMAL PARAMETERS:
;   0855  1	!
;   0856  1	!       JFN         Port number
;   0857  1	!       SENSE       4-byte IBM sense code
;   0858  1	!       REASON      Reason for the reject
;   0859  1	!
;   0860  1	! IMPLICIT INPUTS:
;   0861  1	!
;   0862  1	!	none
;   0863  1	!
;   0864  1	! IMPLICIT OUTPUTS:
;   0865  1	!
;   0866  1	!	none
;   0867  1	!
;   0868  1	! COMPLETION CODES:
;   0869  1	!
;   0870  1	!	none
;   0871  1	!
;   0872  1	! SIDE EFFECTS:
;   0873  1	!
;   0874  1	!	none
;   0875  1	!
;   0876  1	!--
;   0877  1	
;   0878  2	    begin
;   0879  2	
;   0880  2	    local
;   0881  2		LENGTH,
;   0882  2		BASE,
;   0883  2	        BUFFER :block [2],
;   0884  2		POINTER;
;   0885  2	
;   0886  2	    BASE = POINTER = ch$ptr (.BUFFER,,8);
;   0887  2	
;   0888  2	    if (..REASON) neq 0
;   0889  2	    then
;   0890  2	    ch$move (1, ch$ptr (.REASON,,8), .POINTER)
;   0891  2	    else
;   0892  2	    ch$wchar_a (0, POINTER);
;   0893  2	
;   0894  2	    if (..SENSE) neq 0
;   0895  2	    then
;   0896  2	    ch$move (4, ch$ptr (.SENSE,,8), .POINTER)
SAIDLF		SNA GATEWAY ACCESS DECNET LINK FUNCTIONS	13-Feb-1985 13:32:58	TOPS-20 Bliss-36 4A(225)	    Page  27
Version 1.0	GAL$REJECT   (GALREJ)				21-Jan-1985 13:44:41	STAR:<SNA.TAPE2.AI.SOURCE>SAIDLF.B36.1 (8)

;   0897  2	    else
;   0898  2	    ch$wchar_a (0, POINTER);
;   0899  2	
;   0900  2	    ! Get the length of protocol message
;   0901  2	
;   0902  2	    LENGTH = ch$diff (.POINTER, .BASE);
;   0903  2	
;   0904  2	    jsys_mtopr (.JFN, $moclz, .POINTER, .LENGTH);
;   0905  2	
;   0906  2	    return;
;   0907  1	    end;                                ! End of GAL$REJECT


GALREJ::PUSH	SP,AC16				; SP,AC16				400523' 261 17 0 00 000016		0845
	ADJSP	SP,2				; SP,2					400524' 105 17 0 00 000002
	MOVE	AC1,-1(SP)			; AC1,BUFFER				400525' 200 01 0 17 777777		0886
	MOVEI	AC5,-1(AC1)			; AC5,-1(AC1)				400526' 201 05 0 01 777777
	HRLI	AC5,41000			; AC5,41000				400527' 505 05 0 00 041000
	MOVE	AC16,AC5			; POINTER,AC5				400530' 200 16 0 00 000005
	MOVE	AC3,AC16			; BASE,POINTER				400531' 200 03 0 00 000016
	MOVE	AC1,-4(SP)			; AC1,REASON				400532' 200 01 0 17 777774		0888
	SKIPN	0(AC1)				; 0(AC1)				400533' 336 00 0 01 000000
	JRST	L.33				; L.33					400534' 254 00 0 00 400545'
	MOVEI	AC2,-1(AC1)			; AC2,-1(AC1)				400535' 201 02 0 01 777777		0890
	HRLI	AC2,41000			; AC2,41000				400536' 505 02 0 00 041000
	MOVEI	AC1,1				; AC1,1					400537' 201 01 0 00 000001
	MOVEI	AC4,1				; AC4,1					400540' 201 04 0 00 000001
	MOVE	AC5,AC16			; AC5,POINTER				400541' 200 05 0 00 000016
	EXTEND	AC1,C.7				; AC1,[MOVSLJ ]				400542' 123 01 0 00 400522'
	JFCL					; 					400543' 255 00 0 00 000000
	JRST	L.34				; L.34					400544' 254 00 0 00 400547'		0888
L.33:	SETZ	AC1,				; AC1,					400545' 400 01 0 00 000000		0892
	IDPB	AC1,AC16			; AC1,POINTER				400546' 136 01 0 00 000016
L.34:	MOVE	AC1,-5(SP)			; AC1,SENSE				400547' 200 01 0 17 777773		0894
	SKIPN	0(AC1)				; 0(AC1)				400550' 336 00 0 01 000000
	JRST	L.35				; L.35					400551' 254 00 0 00 400562'
	MOVEI	AC2,-1(AC1)			; AC2,-1(AC1)				400552' 201 02 0 01 777777		0896
	HRLI	AC2,41000			; AC2,41000				400553' 505 02 0 00 041000
	MOVEI	AC1,4				; AC1,4					400554' 201 01 0 00 000004
	MOVEI	AC4,4				; AC4,4					400555' 201 04 0 00 000004
	MOVE	AC5,AC16			; AC5,POINTER				400556' 200 05 0 00 000016
	EXTEND	AC1,C.7				; AC1,[MOVSLJ ]				400557' 123 01 0 00 400522'
	JFCL					; 					400560' 255 00 0 00 000000
	JRST	L.36				; L.36					400561' 254 00 0 00 400564'		0894
L.35:	SETZ	AC1,				; AC1,					400562' 400 01 0 00 000000		0898
	IDPB	AC1,AC16			; AC1,POINTER				400563' 136 01 0 00 000016
L.36:	PUSH	SP,AC16				; SP,POINTER				400564' 261 17 0 00 000016		0902
	PUSH	SP,AC3				; SP,BASE				400565' 261 17 0 00 000003
	PUSHJ	SP,CHDIF%			; SP,CHDIF%				400566' 260 17 0 00 000000*
	MOVE	AC4,AC1				; LENGTH,AC1				400567' 200 04 0 00 000001
	MOVE	AC1,-10(SP)			; AC1,JFN				400570' 200 01 0 17 777770		0904
	MOVEI	AC2,40				; AC2,40				400571' 201 02 0 00 000040
SAIDLF		SNA GATEWAY ACCESS DECNET LINK FUNCTIONS	13-Feb-1985 13:32:58	TOPS-20 Bliss-36 4A(225)	    Page  28
Version 1.0	GAL$REJECT   (GALREJ)				21-Jan-1985 13:44:41	STAR:<SNA.TAPE2.AI.SOURCE>SAIDLF.B36.1 (8)

	MOVE	AC3,AC16			; AC3,POINTER				400572' 200 03 0 00 000016
	JSYS	77				; 77					400573' 104 00 0 00 000077
	JUMP	16,L.37				; 16,L.37				400574' 320 16 0 00 400575'
L.37:	ADJSP	SP,-4				; SP,-4					400575' 105 17 0 00 777774		0906
	POP	SP,AC16				; SP,AC16				400576' 262 17 0 00 000016		0845
	POPJ	SP,				; SP,					400577' 263 17 0 00 000000

; Routine Size:  45 words


;   0908  1	
SAIDLF		SNA GATEWAY ACCESS DECNET LINK FUNCTIONS	13-Feb-1985 13:32:58	TOPS-20 Bliss-36 4A(225)	    Page  29
Version 1.0	GAL$INTERRUPT   (GALINT)			21-Jan-1985 13:44:41	STAR:<SNA.TAPE2.AI.SOURCE>SAIDLF.B36.1 (9)

;   0909  1	%global_routine ('GAL$INTERRUPT', ARGBLK: ref ARGUMENT_BLOCK, BUFFER, BUFLEN) : novalue =
;   0910  1	
;   0911  1	!++
;   0912  1	! FUNCTIONAL DESCRIPTION:
;   0913  1	!
;   0914  1	!       Assemble outgoing interrupt message
;   0915  1	!
;   0916  1	!	MSG: /SEQNUM/RH/DATA/
;   0917  1	!
;   0918  1	! FORMAL PARAMETERS:
;   0919  1	!
;   0920  1	!	ARGBLK          Argument block contains fields to be assembled.
;   0921  1	!       BUFFER          Address of buffer to store the protocol message.
;   0922  1	!       BUFLEN          Length of the protocol message to be returned.
;   0923  1	!
;   0924  1	! IMPLICIT INPUTS:
;   0925  1	!
;   0926  1	!	none
;   0927  1	!
;   0928  1	! IMPLICIT OUTPUTS:
;   0929  1	!
;   0930  1	!	none
;   0931  1	!
;   0932  1	! COMPLETION CODES:
;   0933  1	!
;   0934  1	!	none
;   0935  1	!
;   0936  1	! SIDE EFFECTS:
;   0937  1	!
;   0938  1	!	none
;   0939  1	!
;   0940  1	!--
;   0941  1	
;   0942  2	    begin
;   0943  2	
;   0944  2	    local
;   0945  2	        BASE,
;   0946  2	        LENGTH,
;   0947  2	        POINTER;
;   0948  2	
;   0949  2	    POINTER = BASE = ch$ptr (.BUFFER,,8);
;   0950  2	    
;   0951  2	    ch$wchar_a (0, POINTER);
;   0952  2	    
;   0953  2	    ! Put in the Sequence (2-byte) number
;   0954  2	    
;   0955  2	    ch$move (2, ch$ptr (.ARGBLK[TRA_SEQ_NUMBER],,8), .POINTER);
;   0956  2	
;   0957  2	    POINTER = ch$move (3, ch$ptr (.ARGBLK[TRA_RH],,8), .POINTER);
;   0958  2	
;   0959  2	!    ch$move (.ARGBLK[TRA_DATA_LENGTH], .ARGBLK[TRA_DATA], .POINTER);
;   0960  2	
SAIDLF		SNA GATEWAY ACCESS DECNET LINK FUNCTIONS	13-Feb-1985 13:32:58	TOPS-20 Bliss-36 4A(225)	    Page  30
Version 1.0	GAL$INTERRUPT   (GALINT)			21-Jan-1985 13:44:41	STAR:<SNA.TAPE2.AI.SOURCE>SAIDLF.B36.1 (9)

;   0961  2	    ! Assemble data. This section is non-transportable BLISS code
;   0962  2	
;   0963  2	
;   0964  2	    if (LENGTH = .ARGBLK[TRA_DATA_LENGTH]) gtr 0
;   0965  2	    then jsys_sin (.ARGBLK[TRA_DATA_POINTER], .POINTER, -.LENGTH; ARGBLK[TRA_DATA_POINTER], POINTER);
;   0966  2	
;   0967  2	    ! Get the length of protocol message
;   0968  2	
;   0969  2	    LENGTH = ch$diff (.POINTER, .BASE);
;   0970  2	
;   0971  2	
;   0972  2	    return;
;   0973  1	    end;                                ! End of GAL$INTERRUPT


GALINT::PUSH	SP,AC13				; SP,AC13				400600' 261 17 0 00 000013		0909
	PUSH	SP,AC14				; SP,AC14				400601' 261 17 0 00 000014
	PUSH	SP,AC16				; SP,AC16				400602' 261 17 0 00 000016
	MOVE	AC1,-5(SP)			; AC1,BUFFER				400603' 200 01 0 17 777773		0949
	MOVEI	AC16,-1(AC1)			; AC16,-1(AC1)				400604' 201 16 0 01 777777
	HRLI	AC16,41000			; AC16,41000				400605' 505 16 0 00 041000
	MOVE	AC13,AC16			; POINTER,BASE				400606' 200 13 0 00 000016
	SETZ	AC1,				; AC1,					400607' 400 01 0 00 000000		0951
	IDPB	AC1,AC13			; AC1,POINTER				400610' 136 01 0 00 000013
	MOVE	AC14,-6(SP)			; AC14,ARGBLK				400611' 200 14 0 17 777772		0955
	MOVE	AC1,4(AC14)			; AC1,4(AC14)				400612' 200 01 0 14 000004
	MOVEI	AC2,-1(AC1)			; AC2,-1(AC1)				400613' 201 02 0 01 777777
	HRLI	AC2,41000			; AC2,41000				400614' 505 02 0 00 041000
	MOVEI	AC1,2				; AC1,2					400615' 201 01 0 00 000002
	MOVEI	AC4,2				; AC4,2					400616' 201 04 0 00 000002
	MOVE	AC5,AC13			; AC5,POINTER				400617' 200 05 0 00 000013
	EXTEND	AC1,C.7				; AC1,[MOVSLJ ]				400620' 123 01 0 00 400522'
	JFCL					; 					400621' 255 00 0 00 000000
	MOVE	AC1,5(AC14)			; AC1,5(AC14)				400622' 200 01 0 14 000005		0957
	MOVEI	AC2,-1(AC1)			; AC2,-1(AC1)				400623' 201 02 0 01 777777
	HRLI	AC2,41000			; AC2,41000				400624' 505 02 0 00 041000
	MOVEI	AC1,3				; AC1,3					400625' 201 01 0 00 000003
	MOVEI	AC4,3				; AC4,3					400626' 201 04 0 00 000003
	MOVE	AC5,AC13			; AC5,POINTER				400627' 200 05 0 00 000013
	EXTEND	AC1,C.7				; AC1,[MOVSLJ ]				400630' 123 01 0 00 400522'
	JFCL					; 					400631' 255 00 0 00 000000
	MOVE	AC13,AC5			; POINTER,AC5				400632' 200 13 0 00 000005
	HRRE	AC5,2(AC14)			; LENGTH,2(AC14)			400633' 570 05 0 14 000002		0964
	JUMPLE	AC5,L.39			; LENGTH,L.39				400634' 323 05 0 00 400644'
	MOVN	AC3,AC5				; AC3,LENGTH				400635' 210 03 0 00 000005		0965
	MOVE	AC1,3(AC14)			; AC1,3(AC14)				400636' 200 01 0 14 000003
	MOVE	AC2,AC13			; AC2,POINTER				400637' 200 02 0 00 000013
	JSYS	52				; 52					400640' 104 00 0 00 000052
	JUMP	16,L.38				; 16,L.38				400641' 320 16 0 00 400642'
L.38:	MOVE	AC13,AC2			; AC13,AC2				400642' 200 13 0 00 000002
	MOVEM	AC1,3(AC14)			; AC1,3(AC14)				400643' 202 01 0 14 000003
L.39:	PUSH	SP,AC13				; SP,POINTER				400644' 261 17 0 00 000013		0969
SAIDLF		SNA GATEWAY ACCESS DECNET LINK FUNCTIONS	13-Feb-1985 13:32:58	TOPS-20 Bliss-36 4A(225)	    Page  31
Version 1.0	GAL$INTERRUPT   (GALINT)			21-Jan-1985 13:44:41	STAR:<SNA.TAPE2.AI.SOURCE>SAIDLF.B36.1 (9)

	PUSH	SP,AC16				; SP,BASE				400645' 261 17 0 00 000016
	PUSHJ	SP,CHDIF%			; SP,CHDIF%				400646' 260 17 0 00 000000*
	MOVE	AC5,AC1				; LENGTH,AC1				400647' 200 05 0 00 000001
	ADJSP	SP,-2				; SP,-2					400650' 105 17 0 00 777776		0972
	POP	SP,AC16				; SP,AC16				400651' 262 17 0 00 000016		0909
	POP	SP,AC14				; SP,AC14				400652' 262 17 0 00 000014
	POP	SP,AC13				; SP,AC13				400653' 262 17 0 00 000013
	POPJ	SP,				; SP,					400654' 263 17 0 00 000000

; Routine Size:  45 words


;   0974  1	
SAIDLF		SNA GATEWAY ACCESS DECNET LINK FUNCTIONS	13-Feb-1985 13:32:58	TOPS-20 Bliss-36 4A(225)	    Page  32
Version 1.0	GAL$INTERRUPT   (GALINT)			21-Jan-1985 13:44:41	STAR:<SNA.TAPE2.AI.SOURCE>SAIDLF.B36.1 (10)

;   0975  1	end                                   ! End of Module XGADLF
;   0976  0	eludom




; Low  segment length:       0 words
; High segment length:     429 words




;				LIBRARY STATISTICS
;
;					     -------- Symbols --------    Blocks          Processing
;	File				     Total    Loaded   Percent      Read           Time
;
;  KL2102:<BRELEASE.XPORT>MONSYM.L36.1	      3863       259         6        95	     00:00.5
;  STAR:<SNA.TAPE2.AI.SOURCE>SNACOM.L36.2
;					       337       156        46        20	     00:00.3
SAIDLF		SNA GATEWAY ACCESS DECNET LINK FUNCTIONS	13-Feb-1985 13:32:58	TOPS-20 Bliss-36 4A(225)	    Page  33
Version 1.0	GAL$INTERRUPT   (GALINT)			21-Jan-1985 13:44:41	STAR:<SNA.TAPE2.AI.SOURCE>SAIDLF.B36.1 (11)

;   0977  0	
;   0978  0	! Local Modes:
;   0979  0	! Mode:BLISS
;   0980  0	! Auto Save Mode:2
;   0981  0	! Comment Column:40
;   0982  0	! Comment Rounding:+1
;   0983  0	! End:

;			COMPILER INTERNAL TIMING

;	Phase	     Faults	  Cpu-time	Elapsed-time
;	LEXSYN	        205	   00:24.1	   01:23.2
;	FLOWAN	         10	   00:00.6	   00:02.6
;	DELAY	         11	   00:00.6	   00:03.1
;	TNBIND	         18	   00:00.8	   00:02.7
;	CODE	         24	   00:00.6	   00:03.9
;	FINAL	         37	   00:03.0	   00:08.6
;	Total	        305	   00:29.8	   01:44.1

; Size:		429 code + 0 data words
; Run Time:	   00:30.0
; Elapsed Time:	   01:44.9
; Lines/CPU Min:    1969
; Lexemes/CPU-Min:148170
; Memory Used:	73 pages
; Compilation Complete