[net.micro.mac] New ROM globals list

tim@hoptoad.uucp (Tim Maroney) (08/14/86)

Apple Tech Support kindly gave me permission to post this file documenting
the low-memory globals defined by the new ROMs.  These globals are, in many
cases, not guaranteed to be supported in future Mac systems.  I got them
by using the search utility on the assembly language include files that
come with the Macintosh Programmers Workshop.

There are two blocks of globals.  The first listed comes between $B00 and
$C00.  (The new dispatch table is at $C00.)  These are used by various
managers old and new, such as the Resource Manager, Font Manager, and SCSI
Manager.  The second listed takes the place of the old RgSvArea ($36a), and
are used mostly by the Hierarchical File System and the caching system.

Now if someone would just tell me what the bits in SPMisc1 and SPMisc2 do,
I'd be all set....

TrapAgain	EQU	$B00	; use 4 bytes here for another trap
KeyMVars	EQU	$B04	; (word) for ROM KEYM proc state
ROMMapHndl	EQU	$B06	; (long) handle of ROM resource map
PWMBuf1 	EQU	$B0A	; (long) PWM buffer ptr
BootMask	EQU	$B0E	; (word) needed during boot
WidthPtr	EQU	$B10	; (long) Font Mgr global
AtalkHk1	EQU	$B14	; (long) Appletalk hook
AtalkHk2	EQU	$B18	; (long) Appletalk hook
SCSIFlag	EQU	$B22	; (word) Configuration Flag for SCSI
TopMenuItem	EQU	$B26	; (word) used for menu scrolling
AtMenuBottom	EQU	$B28	; (word) flag for menu scrolling
WidthTabHandle	EQU	$B2A	; Font width table handle for measure
SCSIDrvrs	EQU	$B2E	; (word) bitmap for loaded SCSI drivers
TimeVars	EQU	$B30	; the low memory pointer to the variable struct
BtDskRfn	EQU	$B34	; (word) refnum for boot drive driver refnum
BootTmp8	EQU	$B36	; (8bytes) temp space needed by StartBoot
T1Arbitrate	EQU	$B3F	; (byte) $FF if Timer T1 up for grabs.
JDiskSel	EQU	$B40	; (long) vector to .Sony DiskSelect routine 
JSendCmd	EQU	$B44	; (long) vector to .Sony DCD SendCmd routine
JDCDReset	EQU	$B48	; (long) vector to .Sony DCD DCDReset routine
LastSPExtra	EQU	$B4C	; (long) most recent value of space extra
RMGRHiVars	EQU	$B80	; $B80-$BFF are switched vars
				; RMGR vars extend $B80 through $B9F
RomMapInsert	EQU	$B9E	; (byte) determines if we should link in map
TmpResLoad	EQU	$B9F	; second byte is temporary ResLoad value.
IntlSpec	EQU	$BA0	; (long) - ptr to extra Intl data
RMGRPerm	EQU	$BA4	; (byte) - permission byte for OpenResFile
WordRedraw	EQU	$BA5	; (byte) - used by TextEdit RecalDraw
SysFontFam	EQU	$BA6	; (word) System font family ID or zero
SysFontSize	EQU	$BA8	; (word) System font size (or zero for 12 pt)
MBarHeight	EQU	$BAA	; (word) height of menu bar (usually 20)
TESysJust	EQU	$BAC	; (word) system justification (intl. textEdit)
HiHeapMark	EQU	$BAE	; (long) highest addr used by a zone below sp
SegHiEnable	EQU	$BB2	; (byte) 0 to disable MoveHHi in LoadSeg
FDevDisable	EQU	$BB3	; (byte) $FF to disable device-defined style extra
NewUnused	EQU	$BC0	; (word) - used to be FlEvtMask		
LastFOND	EQU	$BC2	; (long) handle of last font def record
FONDID		EQU	$BC6	; (word) ID of last font def record
App2Packs	EQU	$BC8	; $BC8-$BE7 eight more package handles
MAErrProc	EQU	$BE8	; (long) MacApp error proc address
MASuperTab	EQU	$BEC	; (long) handle to MacApp superclass table
FractEnable	EQU	$BF4	; (byte) flag for fractional font widths
UsedFWidths	EQU	$BF5	; (byte) flag saying if we used fract widths
FScaleHFact	EQU	$BF6	; (long) horz. font scale factor
FScaleVFact	EQU	$BFA	; (long) vertical font scale factor

; The old ROMs had a register save area at $36A.  It extended to $3A2.
; This area is used by HFS in the new ROMs.
RgSvArea	EQU	$36A	; reg save during async calls.
HFSVars 	EQU	$36A 	; Start of TFS variables in RAM version
HFSStkTop	EQU	$36A 	; Temporary location of pointer to top of Stack
HFSStkPtr	EQU	$36E 	; Temporary location of TFS Stack pointer
WDCBsPtr	EQU	$372 	; Working Directory queue header
HFSFlags	EQU	$376 	; Internal TFS flags
SysCRefCnt	EQU	$377 	; Usage count byte for system caches (number of vols)
CacheFlag	EQU	$377 	; cache usage count now used as cache flag
SysBMCPtr	EQU	$378 	; System-wide bitmap cache pointer
SysVolCPtr	EQU	$37C 	; System-wide volume cache pointer
SysCtlCPtr	EQU	$380 	; System-wide control cache pointer
DefVRefNum	EQU	$384	; Default volume's VRefNum; COULD BE WDRefNum!
PMSPPtr 	EQU	$386 	; Pointer to list of directories on PMSP
HFSTagData	EQU 	$38A	; Room for additional HFS tag data
HFSDSErr	EQU	$392 	; Final gasp - error that caused IOErr.
HFSVarEnd	EQU	$394 	; End of HFS variable area
CacheVars	EQU	$394
CacheCom	EQU	$39C
CurDirStore	EQU	$398	; save dir across Standard File calls [long]
FmtDefaults	EQU	$39E	; ptr to formatting defs [long]

Remember, most of these should not be counted on for future Mac versions!
They are presented purely for your edification and to help in debugging
software under the new ROMs.
-- 
Tim Maroney, Electronic Village Idiot
{ihnp4,sun,well,ptsfa,lll-crg,frog}!hoptoad!tim (uucp)
hoptoad!tim@lll-crg (arpa)

Give me food, or give me slack (or kill me).