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’sstagesword 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 directCLR.W $0A9A.Wstore; GetAlertStage compiles to a direct word load. Read and write this address withread_word/write_word— usingread_bytereads 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
soundProcargument. 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..^3escapes 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 $8EEimmediately afterCrsrThreshand 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
KeyMapLMat $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
resumeProcparameter; 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
SdVolumeat $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