Skip to main content

Module addr

Module addr 

Source
Expand description

Low-memory global variable addresses

Constants§

ALERT_STAGE
AlertStage / ACount: stage of the last occurrence of an alert (2 bytes, INTEGER per IM:I I-423; MPW reads via #define GetAlertStage() (* (short*) 0x0A9A) per MTb 1992 22620). Holds 0..3 with stage = word+1. The Alert/StopAlert/NoteAlert/CautionAlert trio inspect this word to choose which 4-bit nibble of the ALRT template’s stages word to apply, then increment (capped at 3 — IM:I I-417). InitDialogs ($A97B) zeros it. ResetAlertStage and GetAlertStage are documented “[Not in ROM]” per IM:I I-422 — ResetAlertStage compiles to a direct CLR.W $0A9A.W store; GetAlertStage compiles to a direct word load. Read and write this address with read_word / write_word — using read_byte reads the high byte (always 0 for stages 0..3 on big-endian 68k) which is a subtle latent bug. Inside Macintosh Volume I, I-417 + I-423.
ANUMBER
ANumber: resource ID of the last alert that occurred (2 bytes, INTEGER). Written by Alert/StopAlert/NoteAlert/ CautionAlert ($A985..$A988) on each successful ALRT lookup. Inside Macintosh Volume I, I-423.
APPL_LIMIT
APP_L_ZONE
APP_PARM_HANDLE
AppParmHandle: handle to Finder launch information. The data begins with a message word and selected-file count word. Inside Macintosh Volume II, II-57; Files 1992, 1-58.
BUF_PTR
CURRENT_A5
CUR_APNAME
CUR_APREF_NUM
CUR_DIR_STORE
CUR_JT_OFFSET
CUR_STACK_BASE
DA_BEEPER
DABeeper: address of the current alert sound procedure (4 bytes, ProcPtr). Set by InitDialogs ($A97B) to the standard sound procedure; replaced by ErrorSound ($A98C) from its soundProc argument. NIL means “no sound (and no menu bar blink) at all” per IM:I I-411. Inside Macintosh Volume I, I-411.
DA_STRINGS
DAStrings: handles to the four ParamText strings (16 bytes = 4 × Handle). Substitutable into dialog and alert text via the ^0..^3 escapes at draw time. InitDialogs ($A97B) zeros all 4 entries (== “” empty strings); ParamText ($A98B) replaces each entry with a fresh handle to the caller’s Pascal string. Inside Macintosh Volume I, I-421 (DAStrings global array).
DEF_VCB_PTR
DLG_FONT
DlgFont: font number for subsequently created dialog and alert grafPorts. SetDAFont / SetDialogFont are documented glue routines; assembly code can also set this low-memory global directly. Inside Macintosh Volume I, I-412; Macintosh Toolbox Essentials 1992, p. 6-104.
DS_ERR_CODE
DSErrCode: current system error ID (word) written by SysError. Inside Macintosh Volume III (1985), low-memory globals table.
FCB_S_PTR
FS_Q_HDR
HEAP_END
J_CRSR_TASK
JCrsrTask: address of the cursor VBL task routine (ProcPtr). MPW Interfaces/AIncludes/LowMemEqu.a lists JCrsrTask EQU $8EE immediately after CrsrThresh and before the interrupt mouse globals.
KEY_MAP_LM
KeyMapLM: current keyboard bitmap, 4 longs / 16 bytes. Inside Macintosh Volume I, I-260 documents the GetKeys KeyMap as the current key state indexed by key code; MPW’s SysEqu.h names the low-memory mirror KeyMapLM at $0174.
MBAR_HEIGHT
MB_STATE
MEM_ERR
MemErr: current value of MemError (word). Inside Macintosh Volume IV, IV-80; low-memory table IV-246.
MEM_TOP
MENU_C_INFO
MenuCInfo: handle to the current menu color information table (4 bytes, MCTableHandle). Created by InitMenus and maintained by the Menu Color Manager traps: GetMCInfo ($AA61) returns a deep copy of the current table, SetMCInfo ($AA62) replaces the current table, DispMCInfo ($AA63) disposes a caller-supplied table, GetMCEntry ($AA64) returns a pointer into the live table, and SetMCEntries / DelMCEntries ($AA65 / $AA60) update or remove entries. Systemless HLE still does not auto-load ‘mctb’ resources, but it now stores a real live table here for API compatibility. Per IM:V V-247 + V-571 line 8688: MenuCInfo EQU $0D50. The Menu Color Manager was deprecated in System 7.5 by the Theme Manager (Macintosh Toolbox Essentials 1992 treats the routines as compatibility-only). Inside Macintosh Volume V, V-247..V-248 (Menu Color Manager routines) and V-571 (assembly globals table).
MENU_DISABLE
MenuDisable: menu ID + item number of the last menu item the cursor passed over while a menu was down (4 bytes, LongInt — high word = menuID, low word = itemNumber). Maintained by the standard menu definition procedure (‘MDEF’ 0) on each cursor-into-item transition, regardless of whether the item is enabled or disabled. Read by MenuChoice ($AA66) when the application’s MenuSelect / MenuKey returned zero, to surface “which disabled item did the user click?” for help/explanation UI. Per IM:V V-248 + MTb 1992 3-118 (the canonical EQU at IM:V V-571 line 8689: MenuDisable EQU $0B54). Systemless’s HLE reads this lowmem word directly in MenuChoice; it still does not synthesize the MDEF cursor-tracking writes that classic ROMs receive, so tests seed the value explicitly when they need a deterministic result. Inside Macintosh Volume V, V-248 (MenuChoice routine description) and V-571 (assembly globals table); Macintosh Toolbox Essentials 1992, 3-118..3-119 (MenuChoice canonical chapter).
MENU_FLASH
MMU32_BIT
MMU32Bit: TRUE when 32-bit addressing mode is in effect. Inside Macintosh: Memory 1992, p. 4-25 and low-memory table line 8838; also listed in Inside Macintosh Volume V, V-593.
MOUSE_LOC
MOUSE_LOC2
M_TEMP
RESUME_PROC
ResumeProc: address of the system error resume procedure (4 bytes, ProcPtr). Set by InitDialogs ($A97B) from its resumeProc parameter; read by the System Error Handler when a fatal system error occurs. Inside Macintosh Volume I, I-411 (and the Dialog Mgr globals summary table at I-432).
RND_SEED
ROM85
SCREEN_BITS
SCRN_BASE
SD_VOLUME
SdVolume: current speaker volume (1 byte, low-order three bits). Inside Macintosh Volume III, III-425 lists SdVolume at $0260 and describes it as the current speaker volume, with values 0..7.
SF_SAVE_DISK
SOUND_BASE
SoundBase: pointer to the free-form synthesizer’s main sound buffer. Inside Macintosh Volume III, III-425; Volume IV, IV-247 documents that programs should use this low-memory global rather than fixed hardware-dependent sound-buffer addresses.
SOUND_LEVEL
SoundLevel: amplitude in the Sound Driver’s 740-byte buffer (1 byte). Inside Macintosh Volume III, III-425.
SYS_ZONE
TE_SCRP_HANDLE
TEScrpHandle: handle to the TextEdit scrap (4 bytes, Handle). Per IM:I I-389 + assembly note at I-12598: the allocated relocatable block holding the cut/copied text bytes. TEInit ($A9CC) allocates a zero-length handle here on first call; TECopy / TECut / TEPaste resize the underlying block as needed. NIL if TEInit hasn’t run yet — defensive callers should check before dereferencing. Inside Macintosh Volume I, I-389 (TEScrpHandle global).
TE_SCRP_LENGTH
TEScrpLength: size of the TextEdit scrap in bytes (2-byte INTEGER). Per IM:I I-389 + I-390 + assembly note at I-12606: contains the byte count of the cut/copied text currently held in the TE-private scrap (separate from the shared desk scrap). Set to 0 by TEInit ($A9CC); rewritten by TECopy / TECut / TEPaste / TEFromScrap each time the scrap is touched. Apps that probe this from assembly to detect “is there text on the TE clipboard?” rely on it being correctly maintained. Inside Macintosh Volume I, I-389 (TEScrpLength global).
THE_PORT
THE_ZONE
TICKS
TIME
VCB_Q_HDR