sys7.1-doc-wip/OS/NetBoot/ATIncludes/vardefs2.a
2019-07-27 22:37:48 +08:00

164 lines
6.6 KiB
Plaintext

;
; File: vardefs2.a
;
; Contains: xxx put contents here (or delete the whole line) xxx
;
; Written by: xxx put name of writer here (or delete the whole line) xxx
;
; Copyright: © 1987-1991 by Apple Computer, Inc., all rights reserved.
;
; Change History (most recent first):
;
; <1> 10/14/91 JSM first checked in
; <1.1> 9/8/89 jhl Phase 2 AppleTalk with final mods and VM rolled in.
; <1.0> 6/14/89 WTO Adding AppleTalk 2.0 for first time.
; <2.0d1> 9/6/88 KEL - AppleTalk 2.0.
; <1.0> 12/23/87 BBM Converted appletalk sources to new build process.
;
;
;EASE$$$ READ ONLY COPY of file “vardefs2.a”
; 1.1 jhl 09/08/1989 Phase 2 AppleTalk with final mods and VM rolled in.
; 1.0 WTO 06/14/1989 Adding AppleTalk 2.0 for first time.
; END EASE MODIFICATION HISTORY
;-----------=-----------=-------------------------------=---------------------------------------
;
; 2.0d1 06 Sep 88 KEL - AppleTalk 2.0.
;
;-----------=-----------=-------------------------------=---------------------------------------
;EASE$$$ READ ONLY COPY of file vardefs.a
; 1.0 BBM 12/23/87 Converted appletalk sources to new build process.
; END EASE MODIFICATION HISTORY
;-----------=-----------=-------------------------------=---------------------------------------
;
; MPP Local Variables. Complete variable layout:
;
; SysLAPAddr +-------------------+ <- MPPVars (and A2)
; | MPP Globals |
; | (including RHA) | defined in ATalkequ.a
; AfterGlobals +-------------------+
; | MPP Local | (protocol handler table, socket listener table, ...)
; | Variables | *** DEFINED IN THIS FILE ***
; MPPVarsEnd +-------------------+
; | LAP-only variables| defined in LAPvars.a
; DataSize +-------------------+
;
;-----------=-----------=-------------------------------=---------------------------------------
NumOfPHs EQU AfterGlobals ; Entries in PH table (45)
NumOfSkts EQU NumOfPHs+1 ; Entries in socket table (45)
;-----------=-----------=-------------------------------=---------------------------------------
; The LAP protocol handler table starts here.
;
; Format:
; .BYTE ProtCode1, ..., ProtCodeN ; Protocol type codes
; .LONG PHAddr1, ..., PHAddrN ; Protocol handler addresses
;-----------=-----------=-------------------------------=---------------------------------------
LAPTblSz EQU PHs ; Size of LAP protocol handler table (even)
Protocols EQU NumOfSkts+1 ; List of active protocols
Handlers EQU Protocols+LAPTblSz ; List of handler addresses
LAPTblEnd EQU Handlers+(4*LAPTblSz) ; End of LAP table
;-----------=-----------=-------------------------------=---------------------------------------
; The DDP socket table starts here.
;
; Format:
; .BYTE SktNum1, .., SktNumN ; Socket numbers
; .LONG SktLstAdr1, .., SktLstAdrN ; Socket listener addresses
;
; NOTE: The last offset in this table must be less than $80 [for Offset(A2,D2)].
; This table only used for statically-assigned sockets (45)
;-----------=-----------=-------------------------------=---------------------------------------
DDPTblSz EQU SASs ; Size of socket table (even!)
SocketNum EQU LAPTblEnd ; Socket number in socket table
SktLstnr EQU SocketNum+DDPTblSz ; Socket listener addr
EPBufPtr EQU SktLstnr+(4*DDPTblSz) ; Pointer to EP buffer
;-----------=-----------=-------------------------------=---------------------------------------
; The following is the DAS socket table. There is one longword for each
; potentially opened DAS, FirstDAS thru MaxBigSkt, indicating the socket
; listener address, or zero if the socket hasn't been opened.
;-----------=-----------=-------------------------------=---------------------------------------
FirstDAS EQU DDPMaxWKS+1 ; First DAS socket number
MaxBigSkt EQU $FE ; Largest socket in table
BigSktListen EQU EPBufPtr+4 ; Start of DAS table
DDPTblEnd EQU BigSktListen+(4*(MaxBigSkt-DDPMaxWKS)) ; End of DAS table
;-----------=-----------=-------------------------------=---------------------------------------
; VBL variables - the following are used in the VBL task
;-----------=-----------=-------------------------------=---------------------------------------
VBLQEl EQU DDPTblEnd ; A VBL queue element
VBL20 EQU 20 ; Call VBL task every 20 ticks
BrTimeVal EQU 150 ; Age-out for A_BRIDGE (= 50 seconds)
;-----------=-----------=-------------------------------=---------------------------------------
; Code resource variables - the following are used for loading and
; calling the code resources (non-resident NBP code and lookup-reply code)
;-----------=-----------=-------------------------------=---------------------------------------
NRPtr EQU VBLQEl+14 ; Ptr to non-resident code (and flag)
LookupPtr EQU NRPtr+4 ; Pointer to lookup-reply code (and flag)
NRVars EQU LookupPtr+4 ; Pointer to NR local variables
JDDPWrite EQU NRVars+4 ; Address of DDPWrite routine
NTQueueHd EQU JDDPWrite+4 ; Names Table Queue Head
LUQElPtr EQU NTQueueHd+4 ; Ptr to lookup queue element/buffer
SelfSend EQU LUQElPtr+4 ; Whether to send packet to self
MPPVarsEnd EQU SelfSend+2 ; End of MPP vars (*** more in LAPvars.a ***)
;
; Definitions for NBP code resources
;
NBPCodeType EQU 'NBPC' ; Type code for NBP code resource
NBPNRCode EQU 1 ; ID for NBP non-resident code
NBPLookup EQU 2 ; ID for lookup-reply code
EJECT
;
; The lookup-reply code uses a combination queue element and buffer for
; reading in LkUp requests, queueing a LookupReply command to itself, and
; writing out a response through DDP. The LkUp request is read into the
; queue element starting at CSParam, and the data structures for DDPWrite
; are then built on top of it. This queue element/buffer's size is:
;
LUQElSize EQU CSParam+NBPTuple+ArgBlkSz+2+(WDSEntrySz*(TupleMax+2))+2
;
; external bits
;
NoNetNotify EQU 28 ; = 1 to supress 'Bad Net' NM message
;
; internal bits
;
; ***** WARNING - The ExtendedBit MUST remain at bit 15 *****
;
ExtendedBit EQU 15 ; = 1 iff this port is extended AppleTalk
SeedPortBit EQU 14 ; = 1 iff this port is a router AND a seed port
UserMPPBit EQU 13 ; = 1 iff this is default (user port) .MPP, i.e. refNum -10
MPPOpenBit EQU 11 ; = 1 iff .MPP has opened successfully
CloseATPBit EQU 10 ; = 1 iff .ATP is being closed by .MPP
ATPOpenBit EQU 9 ; = 1 iff .ATP has opened successfully
UseBuiltIn EQU 8 ; = 1 when using built-in AppleTalk
ioMixMask EQU (1<<SrvAdrBit)+(1<<RouterBit)+(1<<NoZoneNotify)
;-----------=-----------=-------------------------------=---------------------------------------
; *** End VARDEFS.TEXT ***