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

272 lines
8.9 KiB
Plaintext

;
; File: LAPMgrEqu.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.4> 11/17/89 CCH Took space out of “LM Equates.a”.
; <1.3> 11/16/89 WTO Added support for VM deferrals.
; <1.2> 9/8/89 jhl Phase 2 AppleTalk with final mods and VM rolled in.
; <1.1> 7/24/89 SGS Get IOP Atlk out of ROM for F19
; <1.0> 6/14/89 WTO Adding AppleTalk 2.0 for first time.
;
;
;EASE$$$ READ ONLY COPY of file “LapMgrEqu.a”
; 1.4 CCH 11/17/1989 Took space out of “LM Equates.a”.
; 1.3 WTO 11/16/1989 Added support for VM deferrals.
; 1.2 jhl 09/08/1989 Phase 2 AppleTalk with final mods and VM rolled in.
; 1.1 SGS 07/24/1989 Get IOP Atlk out of ROM for F19
; 1.0 WTO 06/14/1989 Adding AppleTalk 2.0 for first time.
; END EASE MODIFICATION HISTORY
IF (&TYPE('MHdrSize') = 'UNDEFINED') THEN
INCLUDE '802Equ.a' ; IEEE equates
ENDIF
IF (&TYPE('WDSEntrySz') = 'UNDEFINED') THEN
INCLUDE 'ATalkEqu.a' ; AppleTalk equates
ENDIF
IF (&TYPE('xMaxCall') = 'UNDEFINED') THEN
INCLUDE 'ATalkEqu2.a' ; New AppleTalk equates
ENDIF
INCLUDE 'LMEquates.a' ; public equeates
;___________________________________________________________________________
;
; LAPMgrEqu.a - LAP manager and AppleTalk Device CDEV equates
;
; Alan Oppenheimer
; April 1987
;
; Version 2.0a0 5/6/88 Added ReSelADEV
; Version 2.0d1 9/22/87 For multi-port
; Version 1.0b2 7/14/87 AARP attach and detach, GetATalkInfo calls
; Version 1.0d4 4/28/87
;
; COPYRIGHT (C) 1987,1988 APPLE COMPUTER
;___________________________________________________________________________
; atlk call codes passed in D0 (call at atlk start plus 2)
AOpen EQU 7 ; Open an ATlk
AClose Equ 8 ; Close an ATlk
;
; Lowmem equates
;
ATalkPRAM EQU $E0 ; Start of our PRAM
LAPMgrByte EQU $60 ; Value of byte pointed to by LAPMgrPtr
LAPMgrVers EQU 6 ; Offset to LAP manager version number
; Notification Manager
NMRec RECORD 0
qLink DS.L 1 ; next queue entry
qType DS.W 1 ; queue type -- ORD(nmType) = 8
nmFlags DS.W 1 ; reserved
nmPrivate DS.L 1 ; reserved
nmReserved DS.W 1 ; reserved
nmMark DS.W 1 ; item to mark in Apple menu
nmSIcon DS.L 1 ; handle to small icon
nmSound DS.L 1 ; handle to sound record
nmStr DS.L 1 ; string to appear in alert
nmResp DS.L 1 ; ptr to response routine
nmRefCon DS.L 1 ; for application use
NMRecSz DS.B 0
ENDR
IF (&TYPE('nmType') = 'UNDEFINED') THEN
nmType EQU 8
; _NMInstall OPWORD $A05E
; _NMRemove OPWORD $A05F
ENDIF
;__________________________________
;
; Format of AARP listener table (one for each slot):
; .BYTE NumInUse ; Number of entries in use
; .BYTE Unused
; .WORD DrvrRefnum ; Driver refnum we're using
; .LONG Types1, ..., TypesN ; Hardware/protocol types (zero = free)
; .LONG ListnAddr1, ..., ListnAddrN ; Listener addresses
;__________________________________
NumLTs EQU 6 ; Number of AARP listener tables
LTEntries EQU 1 ; Entries in an AARP listener table
LTTypeSz EQU 4 ; AARP types are 4 bytes
PtrSz EQU 4 ; A pointer is 4 bytes also
LTEntry RECORD 0 ; listener tables entry
LTNumInUse DS.B 1 ; Number of entries in use
LTFiller DS.B 1 ; Unused
LTDrvrRefnum DS.W 1 ; Driver refnum we're using
LTTypes DS.B (LTEntries*LTTypeSz) ; List of types
LTListnrs DS.B (LTEntries*PtrSz) ; List of listener addresses
LTSize DS.B 0
ENDR
;__________________________________
;
; Format of LLC listener tables (one for each slot):
;
;
;
;
;
;__________________________________
numDRVRs EQU 6
DRVRentry RECORD 0
DrvrRefnum DS.B 2 ; Refnum of installed driver
SAPsInUse DS.B 2 ; Number of SAP listeners installed
SNAPsInUse DS.B 2 ; Number of SNAP listeners installed
AARPsInUse DS.B 2 ; Number of AARP listeners installed
DRVRentrySz DS.B 0
ENDR
numSAPs EQU 8
SAPentry RECORD 0
protoCode DS.B 4 ; ptr to listener
protoDRVR DS.B 2 ; refNum of this entry's DRVR
protoType DS.B 2 ; 1-byte type + 1-byte pad
SAPentrySz DS.B 0
ENDR
numSNAPs EQU 16
SNAPentry RECORD 0
protoCode DS.B 4 ; ptr to listener
protoDRVR DS.B 2 ; refNum of this entry's DRVR
protoType DS.B 6 ; 5-byte type + 1-byte pad
SNAPentrySz DS.B 0
ENDR
numAARPs EQU 8
AARPentry RECORD 0
protoCode DS.B 4 ; ptr to listener
protoDRVR DS.B 2 ; refNum of this entry's DRVR
protoType DS.B 4 ; 4-byte type
AARPentrySz DS.B 0
ENDR
;__________________________________
;
; Port entry definitions - there is one port entry for each configured port
;__________________________________
PEADEVWrite EQU 0 ; Address of ADEV write code
PEMaxENQs EQU PEADEVWrite+4 ; Maximum ENQs until give up
PEOurFlags EQU PEMaxENQs+2 ; Flags for write
PEUseByte EQU PEOurFlags+1 ; Port Use byte
PEpRAM EQU PEUseByte+1 ; pRAM value for this port
PEFiller EQU PEpRAM+4 ; Make size a power of two
PESize EQU PEFiller+4 ; Size of a port entry (2^4)
;__________________________________
;
; Offsets within our variables
;__________________________________
NumPorts EQU 0 ; Number of ports in table
SysVRefnum EQU NumPorts+2 ; VRefnum of bridge volume (and bridge-active flag)
BrdgRefnum EQU SysVRefnum+2 ; Bridge file refnum
BrdgName EQU BrdgRefnum+2 ; Bridge file name
LETblStart EQU BrdgName+32 ; Start of AARP listener tables
;
; 802.2 LLC listener tables
;
DRVRtblStart EQU LETblStart+NumLTs*LTEntry.LTSize ; driver tables (one per slot)
SAPtblStart EQU DRVRtblStart+numDRVRs*DRVRentry.DRVRentrySz ; SAP listeners
SAPtblEnd EQU SAPtblStart+numSAPs*SAPentry.SAPentrySz
SNAPtblStart EQU SAPtblEnd ; SNAP listeners
SNAPtblEnd EQU SNAPtblStart+numSNAPs*SNAPentry.SNAPentrySz
AARPtblStart EQU SNAPtblEnd ; AARP listeners
AARPtblEnd EQU AARPtblStart+numAARPs*AARPentry.AARPentrySz
GetRAddr EQU AARPtblEnd ; trap addr of _GetResource
AlertStrings EQU GetRAddr+4 ; notification mgr strings
PortBUsage EQU AlertStrings+4 ; flag (byte) for printer port usage
NoRouter EQU PortBUsage+1 ; flag (byte) to indicate presence of routing code
RspBuffer EQU NoRouter+1 ; ( 6) for returning XID and TEST responses
MACHdr EQU RspBuffer+MACAddrSz ; (14) packet's 802.3 MAC header
LLCHdr EQU MACHdr+MHdrSize ; ( 3) packet's 802.2 LLC header
SNAPHdr EQU LLCHdr+LHdrSize ; ( 5) packet's SNAP header
EnetQEl EQU SNAPHdr+SHdrSize ; (50) for returning XID and TEST responses
EnetWDS EQU EnetQEl+ioQElSize ; ( 8) for returning XID and TEST responses
SAPptr EQU EnetWDS+wdsEntrySz+2 ; ( 4) for returning XID and TEST responses
SAPdrvr EQU SAPptr+4 ; ( 2) for returning XID and TEST responses
ourNMRec EQU SAPdrvr+2 ; for notification alerts
ZAlertBuff EQU ourNMRec+NMRec.NMRecSz ; for bad zone notifications
AtlkEventQ EQU ZAlertBuff+4 ; queue of Appletalk events
saveXppHook EQU AtlkEventQ+qHeadSize ; (4) ptr to next routine in .XPP control chain
xCallTbl EQU saveXppHook+4 ; dispatch table for XPP xCalls
;
;*** WARNING: PETblStart must be the last offset defined (add new vars before it)
;
PETblStart EQU xCallTbl+(xMaxCall+1)*PtrSz ; Start of port entry table
;
; Misc.
;
;;OurVersion EQU SubVersion ; Our version number (1.0 was $26)
ChangedPRAMErr EQU -1 ; Error if atlk changed pRAM if bridge
MaxFNSize EQU 32 ; Maximum filename size (even)
ResidentStrs EQU -16408 ; res id of resident alert strings
CantFindALRT EQU -16407 ; Can't find ADEV alert resource ID
ADEVErrALRT EQU -16406 ; ADEV error alert resource ID
BridgeALRT EQU -16405 ; Bridge general alert
BridgeSTR EQU -16404 ; Bridge STR# resource
ATResID1 EQU -16403 ; reserved resource ID
ATResID2 EQU -16402 ; reserved resource ID
ATResID3 EQU -16401 ; reserved resource ID
BridgeNameSTR EQU 1 ; Name of bridge file
CantFindSTR EQU 2 ; Can't find ADEV STR# index
ADEVErrSTR EQU 3 ; ADEV error index
NoBridgeSTR EQU 4 ; No bridge file index
BadBridgeSTR EQU 5 ; Bad bridge file index
ADEVModem EQU ('SC' << 16) + $0303 ; pram value for modem port ATLK
ADEVPrinter EQU ('SC' << 16) + $0101 ; pram value for printer port ATLK
AInitID EQU 'AINI' ; AppleTalk INITs res type
;
; Lower Byte of Parameter RAM Values
;
LAPBuiltin EQU 0 ; LAP Type for builtin driver on the printer port
LAPPrinter EQU 1 ; LAP Type for printer port ADEV
LAPModem EQU 3 ; LAP Type for modem port ADEV