You may have wondered, as I have, why nobody has ever come up with any
kind of comprehensive listing of the Mac's ROM traps and global
variables. So far, the lists in existence are scattered in many widely
varying sources. For example, Apple's Inside Macintosh contains ROM
trap listings in both alphabetical and numeric orders, but its global
variable list is both incomplete and in alphabetic order only. Having
lists ordered by memory address helps make debugging with TMON and
Macsbug much easier. It also helps programmers using 68000 assembly
language, such as myself.
Apple's official policy is that programmers should use the names of
variables when writing their programs. Their reasoning is that the use
of names will prevent incompatibilities with future Macs and/or system
files. I don't follow that policy for two reasons. First, the only way
to create incompatibilities is for Apple to change the locations of
some or all of the global variables in a future release of system
software. Doing this would immediately invalidate the entire Macintosh
software base, so I don't think Apple would seriously think of it.
Secondly, encoding the actual addresses helps debugging since my
source code becomes closer to the object code. This is efficient
because I only have to look up variable names once when writing source
code and eliminates multiple lookups when debugging with Macsbug.
Normally I use variable addresses in my source code and place variable
names in comment lines.
After struggling with the separated lists, I decided to improve my
productivity by centralizing all that information in a master file.
This master file, MacAlmanac, has since helped me greatly. Its
distribution as PD (Public Domain) made sense, so others could benefit
as well.
It would be a good idea to print this file in its entirety and three-
hole punch it for placement in a binder. This file has been
reformatted for printing on the LaserWriter, and for completeness, the
laser font Times has been substituted for the screen font Geneva used
in Almanac I. The master list will be a time-saver for you, regardless
of what development system you are using (Pascal, C, BASIC, FORTRAN,
Lisp, Forth, etc.). It will also help you if you disassemble bits of
ROM code or other hacker stuff.