water resour managecapacks是什么意思

::development::Mac Alamanac II
The following is an ASCII extraction of the original MacAlmanac II file, which
was written in MacWrite 2.2 format. MacWrite v4.6 and/or v5.0 should be able to
convert it, if not done already (I don't recall if I did this already).
Because this is a text-only extraction, pictures (PICTs) can't appear in the
text stream. I have added them to the resource fork of this file, so you will
still be able to read them with ResEdit.
Since I own the copyright on the presentation (but not the raw data - that
cannot be copyrighted), I expressly give all of you permission to distribute
this file "at will", with no royalties or other charges. I do impose this
restriction commonly applied by other authors: that all copies include this
copyright notice: "MacAlmanacII is Copyright (C)
James H. Olson."
James H. Olson
Last modified: 04 September 1997
MAC ALMANAC II, VERSION 1.0 - 4 JUNE 1990
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 alpha-
betic 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. [Editor's note: distribution method
has since been changed to copyrighted freeware - see note at top of file. -jho]
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.
Revision History:
-----------------
-------------------------------------------
28 January 1987
Created, first release
12 May 1987
Added: Errors on Powerup
25 October 1987
Added: Traps & Keyboards
16 December 1987
Altered pages 19, 27, and 28
30 December 1987
Fonts table reorganized (Page 26)
18 April 1988
Added: new global variables
4 June 1990
Total rewrite of Almanac I, first rerelease
If you need to contact me, I can be reached at my home address:
James H. Olson
2049 - 62nd Street North
Clearwater, FL 33760
JIM_O1@ (office email)
(813) 524-3228
*** MAC ALMANAC IS COPYRIGHTED FREEWARE ***
Apple, Macintosh, Mac, and ResEdit are trademarks registered to Apple Computer, Inc.
Global Variables in Memory Address Order
Simply, global variables on the Macintosh(R) are variables that hold values that
are independent of any running program and don't usually change value when one
program quits and another starts. These variables are all assigned as a group to
one or two large blocks of RAM located between location 0 (the start of RAM) and
the system and application areas of RAM. Each variable is assigned a specific
memory location. Values stored in these variables usually contain information
such as the amount of RAM installed in the Mac, the version of ROM, system, and
Finder installed, mouse location, serial port settings, and the like. Programs
can read and write to any of these variables, and writes will have lasting
effects on the system (until changed again). Upon startup, and again if the Mac
is reset, just about all variables are initialized by the ROM startup code after
any memory tests (see Part 6).
Since the Mac was introduced in 1984, Apple has encouraged people writing Mac
software to read and write to global variables by using their names. When
language compilers see these names, they get the equivalent addresses from an
"include" file specified during the compilation process. The final program only
has the memory addresses. Also since 1984, Apple has made press announcements
and other talk about getting rid of global variables, or at least making major
changes. This verbal noise was particularly evident when Switcher(tm) (later
MultiFinder(tm)) was released. It turns out that changing existing global
variables would create a mass confusion big enough to jeopardize the entire Mac
product line. Because all existing Mac software (system, application, DA, INIT,
etc.) depends on globals, even if the software doesn't access globals directly,
changing them would instantly invalidate the entire Mac software base. Apple can
not arbitrarily change the locations of these variables without creating
problems with just about every Macintosh program on the market. Because of this
restraining effect, Apple only makes improves existing variables or adds new
ones. A good example of this is the variable BootDrive (located at $210). Under
the original 64K ROM it contained the drive number where the boot floppy was
located. When HFS was introduced in 1986, BootDrive was changed to hold the
volume/directory reference number of the boot disk. This change made BootDrive
more useful now that hard disks are frequently used as the boot disk, yet
remains compatible with floppies.
I have attempted to give the most complete listings possible, drawing from
several sources. For instance, Apple's Inside Macintosh(tm) gives only a partial
listing of global variables in alphabetical order. My list is in memory address
order, which is better suited to debugging with MacsBug and other monitor-like
debuggers. The list also exposes "holes": locations Apple hasn't yet made
public. While compiling the list, I noticed some variables had more than one
name. From what I can decipher, many of these variables were used during the
original development of the Macintosh before its release in 1984 and fell into
disuse afterwards. Some even have strange names like "MonkeyLives" ($100) and
"MrMacHook" ($A2C). Microsoft even had a location named after it ($A78- now
ApplScratch), and a location was named after the infamous "Twiggy" 5.25-inch
floppy disk drives on the original Lisa (TwiggyVars, $128). Alternate names
appear probably because Apple re-used these locations for new variables while
developing the 128K ROM. Another good example is ROM85. Under the old 64K ROM,
this was an non-public location that held -1. Under all newer ROMs, this
location always holds a positive value.
In the following list, old names from the 64K ROM are noted by a star "*" in the
left column before their names. Note that certain sections of memory have
special names declared. These area-designators look like variables but are easy
to pick out- their size fields contain hyphens. All locations that haven't
been made public are marked with "[????]".
Defined Sizes: word = 2 bytes, long = 4 bytes
Description
------------
------------------------------------------------------
start of System communication area
MonkeyLives
monkey lives if nonzero
screen vertical dots/inch
screen horizontal dots/inch
rowBytes of screen
ptr to end of RAM
ptr to end of jump table
lowest stack pointer value as measured in VBL task
ptr to end of application heap
ptr to current heap zone
UTableBase
ptr to unit I/O table
ptr to jump vector table used by MacsBug
temporary pointer used by Disk Driver
*TwiggyVars
ptr to 'other' driver variables (Lisa 5.25" drive)
PollRtnAddr
ptr to 'other' driver variables (Lisa 5.25" drive)
used by Mac 3.5" Disk Driver for read/verify
trap before launch?
Initial Memory Manager checks ok?
try 1-1 disk writes?
code for installed CPU: 0=610, 2=68020,
address of application heap limit
ptr to Mac 3.5" Disk Driver variables
current PWM value
address of SCC poll data start stack location
ptr to SCC poll data procedure
disk routine result code
SysEvtMask
system event mask
ptr to system event queue element buffer
EventQueue
event queue header
maximum #of events in SysEvtBuf minus 1
random number seed
SysVersion
System file version number (e.g. System 4.1=$0410)
0 = SysEvent always returns FALSE
DSWndUpdate
GetNextEvent not to paint behind System error dialog?
font manager loop flag
1 byte of filler
VBL queue header
Tick count: time since system startup (tick=1/60 sec)
tick count when mouse button was last pressed
current mouse button state
Lisa sub-tick count
bitmap of the keyboard
bitmap for numeric keypad (uses 18 bits)
ASCII code for last valid keycode
tickcount when KEYLAST was received
KeyRepTime
tick count when key was last repeated
threshold for key repeat
KeyRepThresh
key repeat speed
Level-1 secondary interrupt vector table
Level-2 secondary interrupt vector table
UnitNtryCnt
count of entries in unit table
base address of 6522 VIA chip
addr of Z8530 SCC chip (used when reading the chip)
address of Z8530 SCC chip (used when writing the chip)
base address of IWM chip (floppy drive controller)
general scratch area
System parameter RAM vars (PRAM info)
validation: $A8 if last write to clock chip was good
AppleTalk node ID for modem port
AppleTalk node ID for printer port
serial-port-in-use flags for both ports
modem port configuration (baud, parity, bits)
printer port configuration (baud, parity, bits)
alarm clock setting
font number of application font minus 1
*SPKbdPrint
auto-key threshold/rate and printer connection
auto-key threshold and rate
printer connection
*SPVolClik
double click and caret flash times
speaker volume
SPClikCaret
double click and caret flash times
reserved for future use
mouse tracking, startup floppy drive, menu blink
current date/time (seconds since midnight 1 JAN 1904)
*BootDrive
drive number of boot drive
working directory reference number of boot disk
journaling shell state
negative of vRefNum last seen by Standard File Package
SFSaveDisk
negative of vRefNum last seen by Standard File Package
Keyboard manager variables
ADB address of keyboard last used
ptr to keyboard VBL task hook
keyboard model number
AlarmState
alarm clock: Bit7=parity, Bit6=beeped, Bit0=enable
*CurIOTrap
current I/O trap being executed
Memory Manager error code
Disk driver variables (60 bytes)
[Editor note: ignore this line]
mask of flushable events (FlushEvents)
Current speaker volume (bits 0 through 2 only)
Sound enabled?
Sound driver variables (32 bytes)
pointer to 4-voice sound definition (SynthRec)
ptr to free-form sound definition (SynthRec)
vertical retrace control element
pointer to Sound Driver's device control entry
SoundActive
sound is active?
SoundLevel
current amplitude in 740-byte sound buffer
current value of COUNT in square-wave SynthRec
address past last sound variable
holds a positive value if 128K or later ROM in Mac
Port A usage: if zero, port available
Port B usage: if zero, port available
ScreenVars
Screen driver variables (8 bytes)
JGNEFilter
ptr to GetNextEvent filter procedure
ptr to keyboard translator procedure
ptr to numeric keypad translator procedure
starting address of system heap zone
starting address of application heap zone
base address of ROM (Trap Dispatcher)
base address of RAM (Trap Dispatcher)
ptr to BASIC globals
DSAlertTab
ptr to system error alert table in use
External/status interrupt vector table
SCC read register 0 last external/status interrupt - A
SCC read register 0 last external/status interrupt - B
SerialVars
async driver variables (16 bytes)
ptr to AppleTalk variables
FinderName
name of the shell, usually "Finder" (STRING[15])
DoubleTime
double click interval in ticks
caret blink interval in ticks
screen dump enable - zero disables FKEY processing
ScrDmpType
$FF dumps screen, $FE dumps front window (FKEY 4)
sector tag info for disk drivers (14 bytes)
File tags buffer: file number
File tags buffer: flags (bit1=1 if resource fork)
BufTgFBkNum
File tags buffer: logical block number
File tags buffer: last modification date/time
queue header of drives in system
ptr to PWM buffer 1 (or 2 if sound)
heap check RAM code
Memory Manager byte count mask
*MaskHandle
Memory Manager handle mask
Memory Manager pointer mask
holds the constant $00FFFFFF
minimum stack size used in InitApplZone
DefltStack
default size of stack
MMDefFlags
default zone flags
root handle for GrowZone
root pointer for GrowZone
moving handle for GrowZone
DSDrawProc
ptr to alternate system error draw procedure
EjectNotify
ptr to eject notify procedure
ptr to world swaps notify procedure
file system vars (184 bytes)
CurDB/CkdDB
current dir block/used for searches
*FSCallAsync
"One byte free"
flag used by UnMountVol and FlushVol
flag used by OpenRF and FileOpen
flag used by SetFilLock and RstFilLock
when set, all file system calls are synchronized
used by MountVol to flag new mounts
used by Eject and Offline
master directory block in a volume
HFS Globals
HFS global variables (168 bytes)
ptr to file control block buffer
ptr to default volume control block
volume control block queue header
file I/O queue header
Start of TFS variables (RAM version)
Temp location of stack ptr during async calls
Temporary location of HFS stack ptr
Working Directory queue header
Internal HFS flags
*SysCRefCnt
system cache usage count (#of vols)
system cache usage count now used as cache flag
System-wide bitmap cache pointer
SysVolCPtr
System-wide volume cache pointer
SysCtlCPtr
System-wide control cache pointer
DefVRefNum
Default volume's VRefNum/WDRefNum
ptr to list of directories on PMSP
Final gasp - error that caused IOErr
End of HFS variable area
CurDirStore
ID of last directory opened
report errors here during async routines
File Mgr I/O ParamBlock (50 bytes)
used by Rename
used by Rename and CkFilMod
last I/O error
FSQueueHook
ptr to hook to capture all FS calls
ptr to command done hook
DskSwtchHook
ptr to hook for disk-switch dialog
ptr to offline or external file system volume VCB
ptr to external file system
end of file system variables
size o holds -1 on 64K ROM Macs
DSAlertRect
rectangle for system error and disk-switch alerts
*DispatchTab
OS & Toolbox trap dispatch table (64K ROM) (512 words)
OSDispTable
OS trap dispatch table(128K and later ROM) (256 longs)
Description
------------
------------------------------------------------------
graf (QuickDraw) global area
JHideCursor
JShowCursor
JShieldCursor 0808
JCrsrObscure
JUpdateProc
QuickDraw variables
base address of main screen
low-level interrupt mouse location
un-jerked mouse coordinates
processed mouse coordinate
cursor pinning rectangle
cursor hit rectangle
cursor data, mask & hotspot
address of data under cursor
data under the cursor [Editor's note: 64K ROM only]
ptr to data under the cursor
MainDevice
handle to current main device
DeviceList
handle to first element in device list
default QuickDraw colors
cursor visible?
cursor locked out?
cursor changed?
CrsrCouple
cursor coupled to mouse?
cursor nesting level
CrsrObscure
Cursor obscure semaphore
cursor scaled?
V-H mask for ANDing with mouse
MouseOffset
V-H offset for adding after ANDing
JournalFlag
journaling state
jump entry for FMSwapFont
*JFontInfo
jump entry for FMFontMetrics
WidthListHand 08E4
handle to a list of handles of recently-used width
JournalRef
Journalling driver's refnum
CrsrThresh
delta threshold for mouse scaling
address of CrsrVBLTask
End of graphics globals
window manager initialized?
QuickDraw is initialized
ptr to fetch-a-byte routine for drivers
ptr to stash-a-byte routine for drivers
ptr to IODone routine for drivers
Segment Loader variables (68 bytes)
CurApRefNum
refNum of current application's resFile
LaunchFlag
Tells whether Launch or Chain was last called
current value of register A5
CurStackBase
ptr to the base (beginning) of the stack
name of current application (STRING[31])
SaveSegHandle 0930
handle to segment 0 (CODE 0)
CurJTOffset
current jump table offset from register A5
CurPageOption 0936
current page 2 configuration (screen/sound buffers)
HiliteMode
set to -1 if hilighting mode is on, 0 otherwise
LoaderPBlock
param block for ExitToShell
*PrintVars
print code variables
*LastLGlobal
address past last loader global
Print Manager error code
*CoreEditVars 0954
core edit variables
LastPGlobal
address of last printer global
Scrap Manager variables (32 bytes)
*scrapInfo
scrap length
scrap length
scrapHandle
handle to RAM scrap
scrapCount
count changed by ZeroScrap
scrapState
scrap state: tells if scrap exists in RAM or on disk
pointer to scrap file name (normally "Clipboard File")
scrap file name (STRING[15])
End of scrap vars
base address of toolbox globals
toolbox variables
handle to system font
resource ID of application font
font number of application font
Do we have the strike?
FMDefaultSize 0987
default size
*CurFMInput
ptr to QuickDraw FMInput record
CurFMFamily
current font family
current font size
current font face
CurFMNeedBits 098D
boolean telling whether it needs strike
CurFMDevice
current font device
CurFMNumer
current numerator of scale factor
CurFMDenom
current denominator of scale factor
FMgrOutRec
ptr to QuickDraw FontOutput record
Font Manager error code
TFOutFontHandle 099A long handle to font bits
bolding factor
FOutItalic
italic factor
FOutULOffset
underline offset
FOutULShadow
underline halo
FOutULThick
underline thickness
FOutShadow
shadow factor
extra horizontal width
FOutAscent
height above baseline
FOutDescent
height below baseline
FOutWidMax
maximum width of character
FOutLeading
space between lines
FOutUnused
unused (padding) byte -must have even number
point for numerators of scale factor
point for denominators of scale factor
FMDotsPerInch 09B2
h,v dotsPerInch (resolution) of current device
FMStyleTab
style heuristic table given by device
ToolScratch
scratch area
WindowList
ptr to Z-ordered linked list of windows
SaveUpdate
Enable update events?
PaintWhite
erase windows before update event?
ptr to window manager's grafport
ptr to Desk grafPort (Whole screen)
OldStructure
handle to saved structure region
OldContent
handle to saved content region
handle to rounded-corner region drawn as the desktop
SaveVisRgn
handle to temporarily saved visRegion
ptr to user hook called during dragging
general scratch area
scratch rectangle
holds the constant $
holds the constant $FFFFFFFF
TopMenuItem
pixel value of top of scrollable menu
AtMenuBottom
flag for menu scrolling
IconBitmap
scratch bitmap used for plotting things
handle to current menuBar list structure
MBarEnable
menuBar enable for desk acc's that own the menu bar
window kind of deactivated window
flash feedback count
resource ID of hilited menu
SavedHandle
handle to data under a menu
*MrMacHook
Mr. Macintosh hook
ptr to MenuSelect hook called before menu is drawn
ptr to user hook called during MenuSelect
DragPattern
pattern used to draw outlines of dragged regions
DeskPattern
pattern used for the desktop
implicit parameter to DragControl
CurDragAction 0A46
ptr to implicit actionProc for dragControl
floating point state
TopMapHndl
handle to map of most recently opened resource file
SysMapHndl
handle to map of System resourc file
reference number of System resource file
reference number of current resource file
ResReadOnly
Read-only flag
Auto-load feature
Resource Manager error code
re-entering SystemTask
FScaleDisable 0A63
disable font scaling?
CurActivate
ptr to window slated for activate event
CurDeactive
ptr to window slated for deactivate event
ptr to hook for painting the desk
ptr to textEdit doText proc hook
ptr to textEdit recalText proc hook
*MicroSoft
ApplScratch - for Seattle font
ApplScratch
application scratch area
GhostWindow
ptr to window never to be considered frontmost
CloseOrnHook
ptr to hook for closing desk ornaments
ResumeProc
ptr to Resume procedure (System error dialog)
address of Save failsafe procedure
Safe stack ptr for restart or save
resID of last alert
number of times last alert was called (0 through 3)
ptr to current beep routine
paramText substitution strings (4 handles)
TEScrpLengt
textEdit Scrap Length
TEScrpHandl
handle to textEdit Scrap
Handles to PACK resources (ID's from 0 to 7)
SysResName
name of system resource file (STRING[19])
AppParmHandle 0AEC
handle to hold application parameters
last (or current) system error alert ID
ResErrProc
ptr to Resource Manager error procedure
ptr to default word break routine
current font number for dialogs and alerts
LastTGLobal
address of last global
The contents of memory locations from $B00 on up depend on the ROM version installed.
* 64K ROM Macs:
these Macs have a single trap dispatch table located at $400
through $7FF. The system heap begins at $B00, leaving no room
for additional globals.
* 128K and later ROM:
the original trap dispatch table at $400 through $7FF
was converted for use by the Operating System, and a second
trap dispatch table for Toolbox traps was created at $C00.
Its length is 2K on the Mac Plus and SE, and 4K on the SE/30
and II series. The intervening space from $B00 through $BFF
was reserved for new global variables. Note that some globals
were defined within the trap table, with addresses above
$C00. While I do not understand why Apple did this, the
effect is that a few table entries have been pre-empted,
reducing the table's capacity. As explained in the Trap
Dispatcher section below, each A-trap expects a routine
address to be stored in the trap table. Since some of these
locations were used for globals, the affected A-traps cannot
be used (more on this later).
Description
------------
------------------------------------------------------
*HeapStart
start of the System Heap on 64K ROM Macs
use 4 bytes here for another trap
ROMMapHndl
handle to ROM resource map
ptr to PWM buffer
needed during boot
ptr to global width table
ptr to Appletalk hook 1
ptr to Appletalk hook 2
HWCfgFlags
hardware configuration flags (two names for this
SCSI configuration word (bit 15=1 if SCSI installed)
WidthTabHandle0B2A
handle to global width table
boot drive driver reference number
temporary space needed by StartBoot
T1Arbitrate
holds $FF if Timer T1 up for grabs
MenuDisable
resID and menuItem of last chosen menu item
switched variables (128 bytes)
RMGRHiVars
RMGR variables (32 bytes)
RomMapInsert
flag: insert [resource] map to the ROM resources
TmpResLoad
temp SetResLoad state for calls using ROMMapInsert
international software installed if not -1
SysFontFam
if nonzero, the font # for system font
SysFontSize
if nonzero, the system font size
MBarHeight
pixel height of menu bar
formerly FlEvtMask
handle to last family record used
FractEnable
enables fractional widths if not zero
ToolDispTable 0C00
Toolbox trap dispatch table (Mac Plus & SE)
ToolDispTable 0C00
Toolbox trap dispatch table (Mac II series and SE/30)
Start of system heap (Mac Plus & SE)
Start of system heap (Mac II series and SE/30)
Locations defined within the trap dispatch tables:
ptr to ADBReInit pre-/post-processing routine
current address mode
TheGDevice
handle to current active device
AuxWinHead
auxiliary window list header
jump vector to DoVBLTask routine
SynListHandle 0D32
handle to synthetic font list
menu color info table header
deferred task queue header
JDTInstall
jump vector to DTInstall routine
default hilighting color
These variables pre-empt the following A-traps (in same order as lost above):
A0AE (unassigned),
A82C (Pack10),
A832 (unassigned),
A834 (SetFScaleDisable),
A94A (SetMFlash),
A954 (NewControl),
A964 through A968 (SetMinCtl, SetMaxCtl, TestControl, DragControl,
TrackControl).
Note that many of these traps are assigned to ROM calls that have existed since
1984. After checking these locations myself, they appear to be set up for these
traps, not as global variables. Until I can verify the accuracy of my source
list, treat this group of variables with extreme caution. [Editor's note: this
has never been verified.]
MC68000-series Microprocessor Exception Errors
Description
Description
----------------------------
----------------------------
reset: initial stack pointer
uninitialized interrupt
reset: initial program counter
[reserved by Motorola]
spurious interrupt
address error
level 1 interrupt - VIA (SY6522)
illegal instruction
level 2 interrupt - SCC (Z8530)
zero divide
level 3 interrupt - VIA and SCC
CHK bounds check failed
level 4 interrupt - debug switch
TRAPV overflow trap
level 5 interrupt - debug switch
priveleged instruction
level 6 interrupt - debug switch
trace mode
level 7 interrupt - debug switch
VIA, SCC (all 3 together)
$Axxx Trap dispatcher
TRAP instruction vectors
$Fxxx coprocessor instructions
[reserved by Motorola]
[reserved by Motorola]
$100-3FF user interrupt vectors
(Mac global vars)
Macintosh(R) System Errors
NOTE: Certain MC68000 exceptions listed in part A will generate equivalent
system errors.
Description
Description
----------------------------
----------------------------
bus (illegal hardware address)
PACK 1 not found (reserved)
PACK 2 not found (Disk Init)
illegal instruction
PACK 3 not found (Standard File)
zero divide
PACK 4 not found (Floating-pt)
CHK bounds check failed
PACK 5 not found (Transcendental
math functions)
TRAPV overflow trap
PACK 6 not found (International
privileged instruction
PACK 7 not found (Binary/Decimal
trace mode
out of memory
line 1010 trap (A-trap)
segment loader: can't start appl
line 1111 trap (F-trap)
"System" resource file map was
misc hardware exception
stack overran the appl heap
unimplemented core routine
"Please insert the disk: " alert
(bad trap)
uninstalled interrupt
wrong disk (switch disk alert)
(debug/interrupt switch)
"Welcome to Macintosh" alert
segment loader: no such CODE
"Can't load the Finder" alert
floating point
"You may turn off your
Macintosh" alert
PACK 0 not found (List Manager) 32767
General system error
The following system errors are reported under all ROM versions except the original 64K ROM:
Memory Manager: current zone is inconsistent
Memory Manager: value of ZcbFree is negative
Slot Manager: unserviceable slot interrupt
SANE: bad opcode passed to FP68K routine
Menu Manager: menu resource has been purged
Menu Manager: can't find menu bar
Menu Manager: hierarchical menu error
HFS stack overflowed
Toolbox and Operating System Errors
The errors in this section are generated by the various Mac system routines,
either at the Operating System level or at the higher Toolbox level. These
errors are then passed to the program (application, DA, INIT, etc.) which called
the system routine. It is up to the program to handle these errors.
Printing Manager Error
Description
----------------
------------------------------------------------------
Printing Manager: user aborted printing
Slot Manager Initialization Errors
Description
----------------
------------------------------------------------------
sdmPriInitErr
initialize error: installed cards
sdmPRAMInitErr
initialize error: Slot PRAM
sdmSRTInitErr
initialize error: Slot Resource Table
sdmInitErr
initialize error: SDM
sdmJTInitErr
initialize error: SDM Jump Table
siInitSPTblErr
initialize error: slot priority table
siInitVBLQsErr
initialize error: slot VBL queues
siInitSDTblErr
initialize error: slot interrupt dispatch table
SCSI Manager Errors
Description
----------------
------------------------------------------------------
scComplPhaseErr
SCSIC bus not in status phase
scBusTOErr
bus timed out before data was ready for SCSI "blind"
operations SCSIRBlind and SCSIWBlind
scSequenceErr
current operation was started out of proper sequence
scMgrBusyErr
SCSI Manager busy when SCSIGet was called
scCompareErr
SCSI Manager busy when SCSIGet was called
scPhaseErr
bus in wrong phase for attempted operation
scBadparmsErr
bad parameter or TIB opcode
scArbNBErr
arbitration failed during SCSIG bus busy
communications error (operations timeout)
Miscellaneous Errors
Description
----------------
------------------------------------------------------
event type not defined in system event mask
the operation was completed normally
queue element not found during deletion
iPrSavPFil
Printing Manager: saving spool file
invalid queue element
[obsolete] core routine number out of range
[obsolete] unimplemented core routine
no debugger installed to handle debugger traps
Color Manager Errors
Description
----------------
------------------------------------------------------
iTabPurgErr
[no description available]
generated by: Color2Index/ITabMatch
noColMatch
[no description available]
generated by: Color2Index/ITabMatch
[no description available] generated by: MakeITable
tblAllocErr
[no description available] generated by: MakeITable
[no description available] generated by: MakeITable
[no description available] generated by: MakeITable
seOutOfRange
[no description available] generated by: SetEntry
[no description available] generated by: SetEntry
i2CRangeErr
[no description available] generated by: SetEntry
[no description] generated by: SetEntry
reRangeErr
[no description] generated by: SetEntry
seInvRequest
[no description] generated by: SetEntry
seNoMemErr
[no description] generated by: SetEntry
Device Manager Errors
Description
----------------
------------------------------------------------------
controlErr
driver can't handle control calls
driver can't handle status calls
driver can't handle read calls
driver can't handle write calls
badUnitErr
driver refnum isn't in unit table
unitEmptyErr
driver refnum unit table entry is an empty (zero)
R/W permission conflicts with open permission
couldn't open RAM serial driver (64K ROM)
[obsolete]
tried to remove an open driver
DrvrInstall couldn't find driver in resource file
IO call aborted by KillIO
Printing Manager: I/O abort error
notOpenErr
driver not open
unitTblFullErr
unit table full
dce extension error
File System Errors
Description
----------------
------------------------------------------------------
MFS directory full
no such volume
bad name (name is zero-length or contains a colon)
file not open
end of file reached during a read
tried to position before start of file
[obsolete] memory full on open
too many files open
file not found
disk is locked (hardware)
file is locked
disk is locked (software)
file busy (delete); one or more files are open
file with same name & version# already exists
file already open with write permission
error in user parameter list (plus other errors)
File Manager: no such disk (and no default disk
Disk Driver: bad positioning information
Disk Init Package: bad drive number
refnum specifies a nonexistent access path
error during Get file position call (GetFPos)
volOffLinErr
volume not online (was ejected)
tried to open a locked file for writing
volOnLinErr
volume already in drive
no such drive (specified drive number not in drive
noMacDskErr
not a M disk doesn't have Mac directory
volume belongs to an external file system
rename ran into problems
bad master directory block - reinit the disk!
access path doesn't allow writing
Font Manager Errors
Description
----------------
------------------------------------------------------
fontDecError
error during font declaration
fontNotDeclared
font not declared
fontSubErr
font substitution occured
Disk Errors (range: -64 through -84 inclusive)
Description
----------------
------------------------------------------------------
lastDskErr
last of the low-level disk errors (in reverse order)
noDriveErr
drive not installed/connected
operation requested for an offline disk
couldn't find 5 nibbles in 200 tries (blank disk)
noAdrMkErr
couldn't find address mark
dataVerErr
read-verify compare failed
badCksmErr
address mark checksum didn't check
badBtSlpErr
bad address mark bit slip nibbles
noDtaMkErr
couldn't find a data mark header
bad data mark checksum
bad data mark bit slip nibbles
wrUnderrun
write underrun occurred
cantStepErr
step handshake failed (drive fault)
can't find track 0
initIWMErr
unable to initialize IWM (disk controller chip)
twoSideErr
tried to read 2nd side on a single sided drive
unable to correctly adjust 400K drive speed
track number bad on address mark (drive fault)
sector not found on track
can't find sector 0 after track format
can't get enough sync
track failed to verify
firstDskErr
first of the low-level disk errors (in reverse order)
Clock Chip Errors
Description
----------------
------------------------------------------------------
unable to read clock
time written did not verify
Parameter RAM written didn't verify
InitUtil found the PRAM uninitialized (status not $A8)
Device Driver Errors
Description
----------------
------------------------------------------------------
[obsolete] SCC receiver error (framing, parity, OR)
[obsolete] Break received (SCC)
AppleTalk Errors
Description
----------------
------------------------------------------------------
DDP socket error: s not a known
all dynamic socket numbers
DDP datagram or ALAP data too long
noBridgeErr
no such bridge
lapProtErr
ALAP protocol errors, attach or detach
excessCollsns
ALAP too many (over 32) collisions or line sensed in
driver open error: port is already in use
driver open error: port not configured for this
connection
Memory Manager Errors (not available on 64K ROM)
Description
----------------
------------------------------------------------------
hard error in read-only zone
memROZWarn
soft error in read-only zone
Scrap Manager Errors
Description
----------------
------------------------------------------------------
noScrapErr
no scrap exists
no data of that type in scrap
Memory Manager Errors
Description
----------------
------------------------------------------------------
memFullErr
not enough room in heap zone
nilHandleErr
NIL (zero) master pointer (handle is empty)
[obsolete] address was odd or out of range
attempt to operate on a free block
attempt to purge a locked or non-purgable block
[obsolete] address in zone check failed
[obsolete] pointer check failed
[obsolete] block check failed
[obsolete] size check failed
memLockedErr
block is locked
File System Errors (not available on 64K ROM)
Description
----------------
------------------------------------------------------
directory not found
too many working directories open
tried to move into offspring
wrgVolTypErr
tried to do an HFS operation on a nonHFS volume
volGoneErr
Server volume has been disconnected
Menu Manager: MBDF not found
hMenuFindErr
could not find Hierarchical menu's parent (MenuKey)
fsDSIntErr
internal file system fault
Color Quickdraw & Color Manager Errors
Description
----------------
------------------------------------------------------
Color2Index failed to find an index
cTempMemErr
failed to allocate memory for temporary structures
failed to allocate memory for structure
range error on colorTable request
cProtectErr
colorTable entry protection violation
invalid graphics device type
invalid resolution for MakeITable
Resource Manager Errors
Description
----------------
------------------------------------------------------
resNotFound
resource not found
resFNotFound
resource file not found
addResFailed
AddResource failed
addRefFailed
[obsolete] AddReference failed
rmvResFailed
RmveResource failed
rmvRefFailed
[obsolete] RmveReference failed
Resource Manager Errors (not available on 64K ROM)
resAttrErr
attribute prohibits the operation
mapReadErr
resource map is garbled
Sound Manager Errors
Description
----------------
------------------------------------------------------
noHardware
supporting hardware for selected synthesizer doesn't
notEnoughHardware no more channels for selected synthesizer
queue is full
resProblem
problems encountered while loading resource
badChannel
bad channel queue length
bad handle to 'snd ' resource
Slot Manager Errors
Description
----------------
------------------------------------------------------
smSDMInitErr
SDM could not be initialized.
smSRTInitErr
Slot Resource Table could not be initialized.
smPRAMInitErr
Slot Resource Table could not be initialized.
smPriInitErr
Cards could not be initialized.
smEmptySlot
No card in slot
CRC check failed for declaration data
smFormatErr
bad FHeader format in declaration ROM
smRevisionErr
bad revison number in declaration ROM
Directory offset is zero
smLWTstBad
Long Word Test field was not $5A932BC7.
smNosInfoArray
SDM couldn't obtain memory for the sInfo array
smResrvErr
Reserved field not zero (fatal error)
smUnExBusErr
Unexpected bus error occurred
smBLFieldBad
bad ByteLanes field
smFHBlockRdErr
FHeader block couldn't be read
smFHBlkDispErr
FHeader block couldn't be deleted (disposed of)
smDisposePErr
_DisposPointer error
smNoBoardsRsrc
No Board sResource.
smGetPRErr
Error occured during _sGetPRAMRec (See SIMStatus)
smNoBoardId
No Board ID
smIntStatVErr
The InitStatus_V field was negative after primary init
smIntTblVErr
Slot Resource Table initialization failed
smNoJmpTbl
SDM jump table could not be created
smBadBoardId
bad Board ID, re-init the PRAM record
smBusErrTO
BusError timeout
smBadRefId
Reference ID not found in List
smBadsList
ID's in sList aren't in ascending order
smReservedErr
Reserved field not zero
smCodeRevErr
Code revision is wrong (sExec)
CPU field is wrong (sExec)
smsPointerNil
sPointer is zero: no sList specified
smNilsBlockErr
Nil (zero-length) sBlock error
smSlotOOBErr
Slot out of bounds error
smSelOOBErr
Selector out of bounds error
_NewPointer error
smBlkMoveErr
_BlockMove error
smCkStatusErr
bad slot status (InitStatus_A,V)
smGetDrvrNamErr
Error occured during _sGetDrvrName.
smDisDrvrNamErr
Error occured during _sDisDrvrName.
smNoMoresRsrcs
No more sResources
smsGetDrvrErr
Error occurred during _sGetDrvr
smBadsPtrErr
Bad sPointer was passed to an SDM routine
smByteLanesErr
bad byteLanes value was passed to an SDM routine
smOffsetErr
Offset was too big
smNoGoodOpens
No opens were successful in the loop.
smSRTOvrFlErr
sResource table overflowed
smRecNotFnd
Record not found in the sResource table
Slot Manager Error
Description
----------------
------------------------------------------------------
slotNumErr
bad slot number
AppleTalk Errors
Description
----------------
------------------------------------------------------
nbpBuffOvr
NBP buffer overflow
nbpNoConfirm
NBP name not confirmed
nbpConfDiff
NBP name confirmed for different socket
nbpDuplicate
NBP duplicate name found
nbpNotFound
NBP name does not exist
NBP names information socket error
aspBadVersNum
Server cannot support this ASP version
aspBufTooSmall
Buffer too small
aspNoMoreSess
No more sessions on server
aspNoServers
No servers at that address
aspParamErr
Parameter error
aspServerBusy
Server cannot open another session
aspSessClosed
Session closed
aspSizeErr
Command block too big
aspTooMany
Too many clients (server error)
No ACK on attention request (server err)
ATPSndRequest failed: retry count exhausted
tooManyReqs
ATP too many concurrent requests
tooManySkts
ATP too many responding sockets
ATP bad responding socket
badBuffNum
ATP bad sequence number
ATP no release received
cbNotFound
ATP control block does not exist
noSendResp
ATPAddRsp issued before ATPSndRsp
noDataArea
too many active ATP calls
reqAborted
request was aborted
Application Errors (range: -2000 through -2999 inclusive)
reserved for use by the current application
AppleTalk Errors
Description
----------------
------------------------------------------------------
buf2SmallErr
DDP datagram or ALAP frame too big for buffer
MPP driver not installed
DDP bad checksum
extractErr
NBP tuple doesn't exist in buffer
socket or protocol type bad or doesn't exist in table
ATP response message too long
bad response from ATPRequest
ABRecord doesn't exist
sktClosedErr
async call aborted before completion: socket was
Printing Manager Errors (occur with Laserwriters)
Description
----------------
------------------------------------------------------
[no name declared] no free Connect Control Blocks available
[no name declared] bad connection refNum
[no name declared] request already active
[no name declared] write request too big
[no name declared] connection just closed
[no name declared] printer closed or does not exist
AppleTalk Errors
Description
----------------
------------------------------------------------------
afpAccessDenied
[no description available]
afpAuthContinue
[no description available]
[no description available]
afpBadVersNum
[no description available]
afpBitmapErr
[no description available]
afpCantMove
[no description available]
afpDenyConflict
[no description available]
afpDirNotEmpty
[no description available]
afpDiskFull
[no description available]
afpEofError
[no description available]
afpFileBusy
[no description available]
afpFlatVol
[no description available]
afpItemNotFound
[no description available]
afpLockErr
[no description available]
afpMiscErr
[no description available]
afpNoMoreLocks
[no description available]
afpNoServer
[no description available]
afpObjectExists
[no description available]
afpObjectNotFound [no description available]
afpParmErr
[no description available]
afpRangeNotLocked [no description available]
afpRangeOverlap
[no description available]
afpSessClosed
[no description available]
afpUserNotAuth
[no description available]
afpCallNotSupported [no description available]
afpObjectTypeErr
[no description available]
afpTooManyFilesOpen [no description available]
afpServerGoingDown
[no description available]
afpCantRename
[no description available]
afpDirNotFound
[no description available]
afpIconTypeError
[no description available]
_SysEnvirons Errors
Description
----------------
------------------------------------------------------
envNotPresent
returned by glue - _SysEnvirons trap does not exist
envBadVers
Version non- no information was returned
envVersTooBig
Version bigger than _SysEnvirons routine can handle
Macintosh? Trap Dispatcher
The Trap Dispatcher is the part of the Macintosh Operating System that routes
system calls to the actual routines. The Trap Dispatcher has been revised two
times since its initial release, totaling 3 versions. The earliest version was
part of the original 64K ROM shipped with the 128K and 512K Macs. The first
revision appeared in the Mac Plus 128K ROM and the second (and last) revision
appeared in all later Mac models.
The Trap Dispatcher takes advantage of a special feature of the 68000 micro-
processor called unimplemented instructions. These instructions, like all other
68000 instructions, are 16 bits long (2 bytes) and can be represented by four
hex digits. Unimplemented instructions always begin with the hex digits A or F
and can contain anything in the last 3 digits. Whenever the 68000 gets such an
instruction, it automatically performs a trap. The 68000 fetches an address
from a memory location predetermined by Motorola and then jumps to that address.
The Mac ROM startup code automatically stores the starting location of the Trap
Dispatcher into this specific memory location when the system is powered up or
rebooted (the Trap Dispatcher itself is also located in the ROM). Unimplemented
instructions are called A-traps or F-traps, depending on the first hex digit of
the instruction.
Motorola reserved all F-traps for math coprocessor instructions, and allowed the
OEM, i.e. Apple, free use of A-traps. Apple in turn built the whole Macintosh
Operating System around A-traps. All system calls were numbered and were split
into two broad categories, called Toolbox Traps and Operating System (OS) Traps.
Each system call was issued its own A-trap, or trap word, containing its own
trap (system call) number. Apple built the Trap Dispatcher to handle A-traps on
the Macintosh.
Since any A-trap causes the 68000 to invoke the Trap Dispatcher, the Trap
Dispatcher must decode the last 3 digits of the A-trap to figure out which
system call to execute. The diagram below shows how the Trap Dispatcher decodes
(PICT deleted)
Trap word bits are defined as follows.
Bits 15 through 12 are set to the binary pattern 1010 (hexdecimal A) for all
Bit 11 determines the trap's category: 1 for Toolbox traps and 0 for Operating
System traps.
For OS traps, bits 10 and 9 are used for flags, whose meanings depend on the
routine being called. For Toolbox traps, bit 10 is the auto-pop bit. If it is
set, the Trap Dispatcher will remove, or "pop", the return address from the top
of the stack and throw it out. It will then pop the stack again and use that
address as the return address. This feature supports languages such as Lisa
Pascal that always JSR'd to a table of trap words (instead of inserting the
trap words inline with the code).
Bit 9 is a reserved bit in Toolbox trap words in the 64K and 128K ROMs. Apple
added the bit to the trap number on all later ROMs.
Bit 8 is used by OS traps to preserve the 68000's register A0 across a system
call. If the bit is 0, register A0 is saved before the system call begins
execution and restored after it finishes. If the bit is 1, register A0 is not
saved and restored (allows OS routines that resturn a value in A0 to work).
Bits 7 through 0 comprise all or part of the trap number for all traps.
Macintosh? Traps
With the exception of the original 64K ROM found in 128K and 512K Macintoshes,
all Mac ROM sets are based on the 128K ROM found in the Mac 512KE and Plus. The
ROMs in all later Mac models contain some additions not in the 128K ROM. These
additions are marked by asterisk (*) to the left of their name. Apple has tried
to retrofit these additional traps into older Macs (that don't have them in ROM)
by using the System software to install them in RAM, one reason newer systems
are so huge. However, Apple excluded certain goups of traps from the retrofit
process. A good example is Color QuickDraw, which is available only on Macs that
have it in ROM (SE/30 and II series).
While Apple has made many additions to the ROM trap set, only two traps have
been removed. Existing only in the original 64K ROM, the obscure Resource
Manager traps AddReference and RemoveReference never found much use, leading
Apple to declare them "obsolete" and not include them in all later ROMs. These
routines haven't been supported since 1985 and should not be used (in the list
these two routines are marked with a black dot "*"). In fact, they were
described only in the 3-ring binder and phone book editions of Inside Macintosh
and weren't included in the final release.
All ROM traps are given in 68000 assembly language format. Traps in boldface
are bundles of several subroutines. Listings of the subroutines follow the
general list. Be aware that some trap names differ from their high-level
language counterparts. The reason: the original Lisa assembler limited trap
names to 8 significant letters (including the initial underscore), and would
thus see the two names _UnloadSeg and _UnloadScrap as representing the same
trap. Changing the spelling of one of the two traps resolves the name conflict
(thus, _UnloadSeg becomes _UnlodeScrap). In the MDS and MPW assemblers, Apple
increased the character limit to 31. While the new limit would eliminate all
conflicts, Apple made the misspelled names permanent.
For a detailed description of the trap word mechanism, see Part 3A.
------------------
------------------
------------------
*_AddReference
*_ADBReInit
_AddResMenu
*_AllocCursor
_AddResource
_AngleFromSlope
*_AddSearch
_AppendMenu
*_AttachVBL
_BackColor
*_BackPixPat
_BlockMove
_BeginUpdate
_BringToFront
*_CalcCMask
*_CloseCPort
*_CopyPixMap
_CloseDeskAcc
*_CopyPixPat
_CalcMenuSize
_CloseDialog
_CalcVBehind
_ClosePgon
_CouldAlert
_ClosePicture
_CouldDialog
_CautionAlert
_ClosePort
_Count1Resources
_CloseResFile
_Count1Types
_ChangedResource
*_CountADBs
*_CharExtra
_CloseWindow
_CountMItems
_CharWidth
_CmpString
_CountResources
_CheckItem
*_Color2Index
_CountTypes
_CheckUpdate
_ClearMenuBar
_CompactMem
_CreateResFile
_ClipAbove
_CurResFile
*_DisposCIcon
_DragWindow
_DisposControl
_Draw1Control
*_DisposCTable
_DisposDialog
_DrawControls
_DeleteMenu
*_DisposGDevice
_DrawDialog
*_DelMCEntries
_DisposHandle
_DrawGrowIcon
_DelMenuItem
_DisposMenu
_DrawMenuBar
*_DelSearch
*_DisposPixMap
_DeltaPoint
*_DisposPixPat
_DrawPicture
_DisposPtr
_DrawString
_DetachResource
_DisposRgn
_DialogSelect
_DisposWindow
_DrvrInstall
*_DoVBLTask
_DrvrRemove
_DisableItem
_DragControl
*_DTInstall
*_DispMCEntries
_DragGrayRgn
*_DisposCCursor
_DragTheRgn
_EraseRect
_EmptyHandle
_EqualRect
_EraseRoundRect
_EmptyRect
_ErrorSound
_EventAvail
_EnableItem
_EraseOval
_ExitToShell
_EndUpdate
_ErasePoly
*_FillCArc
*_FillCOval
*_FillCPoly
*_FillCRect
*_FillCRgn
*_FillCRoundRect
_FlashMenuBar
_FrameOval
_FlushEvents
_FramePoly
_FlushFile
_FrameRect
_FillRoundRect
_FMSwapFont
_FrameRoundRect
_FindControl
_FontMetrics
_FreeAlert
_FindDItem
_ForeColor
_FreeDialog
_FindWindow
_FrontWindow
------------------
------------------
------------------
_Get1IxResource
*_GetGDevice
_GetOSEvent
_Get1IxType
_GetHandleSize
_GetPattern
_Get1NamedResource
_Get1Resource
*_GetIndADB
_GetPenState
*_GetADBInfo
_GetIndResource
_GetPicture
_GetAppParms
_GetIndType
*_GetAuxCtl
*_GetPixPat
*_GetAuxWin
*_GetItemCmd
*_GetBackColor
_GetPtrSize
*_GetCCursor
_GetItmIcon
_GetResAttrs
*_GetCIcon
_GetItmMark
_GetResFileAttrs
_GetItmStyle
_GetResInfo
*_GetCPixel
_GetResource
_GetCRefCon
*_GetMainDevice
*_GetCTable
_GetMaxCtl
_GetCTitle
*_GetMaxDevice
_GetString
_GetCtlAction
*_GetMCEntry
*_GetSubTable
_GetCtlValue
*_GetMCInfo
_GetTrapAddress
_GetCursor
_GetMenuBar
*_GetVideoDefault
*_GetCVariant
_GetMHandle
*_GetCWMgrPort
_GetMinCtl
_GetVolInfo
*_GetDefaultStartup A07D
_GetWindowPic
*_GetDeviceList
_GetNamedResource
_GetWMgrPort
_GetNewControl
_GetWRefCon
*_GetNewCWindow
_GetWTitle
_GetFileInfo
_GetNewDialog
*_GetWVariant
_GetNewMBar
_GetNewWindow
_GlobalToLocal
_GetFontInfo
*_GetNextDevice
_GrafDevice
*_GetForeColor
_GetNextEvent
_GrowWindow
*_GetOSDefault
------------------
------------------
------------------
_HandAndHand
_HideDItem
_HandleZone
_HandToHand
_HideWindow
_HomeResFile
*_HiliteColor
_HFSDispatch
_HiliteControl
_HGetState
_HiliteMenu
_HSetState
_HideControl
_HiliteWindow
_HideCursor
*_Index2Color
*_InternalWait
_InfoScrap
*_InitProcMenu
_InvalRect
_InitAllPacks
_InitQueue
_InitApplZone
_InitResources
_InverRect
*_InitCport
_InitCursor
_InitWindows
_InverRoundRect
_InitDialogs
_InvertArc
_InitFonts
_InsertMenu
*_InvertColor
*_InitGDevice
_InsertResMenu
_InvertOval
_InsetRect
_InvertPoly
_InitMenus
_IsDialogEvent
_InsMenuItem
*_KeyTrans
_KillControls
_KillPicture
_LocalToGlobal
_LodeScrap
_LoadResource
*_MakeITable
*_MakeRGBPat
_MaxSizeRsrc
_MeasureText
_MoveControl
*_MenuChoice
_MovePortTo
_MenuSelect
_MaxApplZone
_ModalDialog
_MoveWindow
_MoreMasters
*_NewCDialog
*_NewGDevice
_NewControl
_NewHandle
*_NewCWindow
_NewString
_NewDialog
*_NewPixMap
_NewWindow
_NewEmptyHandle
*_NewPixPat
_NoteAlert
_ObscureCursor
_OpenResFile
*_OpenCport
_OffsetPoly
_OpenDeskAcc
_OpenRFPerm
_OffsetRect
_OpenPicture
_OSEventAvail
_PaintBehind
*_PopUpMenuSelect
_PaintOval
_PostEvent
_PaintPoly
_PPostEvent
_PaintRect
*_ProtectEntry
_PaintRoundRect
_ParamText
_PtrAndHand
_PenNormal
_PtrToHand
_PtrToXHand
*_PenPixPat
_PtToAngle
_PicComment
_PurgeSpace
*_PlotCIcon
*_RGBForeColor
_RDrvrInstall
_ReleaseResource
*_RGetResource
_RelString
*_RmveReference
_ReadDateTime
_RmveResource
*_RealColor
_RsrcMapEntry
*_ReserveEntry
_RsrcZoneInit
_ReallocHandle
_RstFilLock
_RecoverHandle
*_RestoreEntries
_RectInRgn
*_RGBBackColor
------------------
------------------
------------------
*_SaveEntries
*_SetGDevice
_SetHandleSize
_ShowWindow
*_Shutdown
*_ScriptUtil
*_SetItemCmd
*_SIntInstall
_ScrollRect
*_SIntRemove
_SCSIDispatch
_SetItmIcon
_SizeControl
_Secs2Date
_SetItmMark
_SetItmStyle
_SizeWindow
_SetMaxCtl
_SlopeFromAngle
*_SeedCFill
*_SetMCEntries
*_SlotManager
*_SetMCInfo
*_SlotVInstall
_SelectWindow
_SetMenuBar
*_SlotVRemove
_SetMFlash
_SpaceExtra
_SendBehind
_SetMinCtl
_StackSpace
*_SetADBInfo
_SetOrigin
_SetAppBase
*_SetOSDefault
_SetApplLimit
*_SetCCursor
_SetPenState
_StdComment
*_SetClientID
_StdGetPic
*_SetCPixel
_SetPtrSize
*_SetCPortPix
_SetRecRgn
_SetCRefCon
_StdPutPic
_SetCTitle
_SetResAttrs
_SetCtlAction
_SetResFileAttrs
*_SetCtlColor
_SetResInfo
_SetCtlValue
_SetResLoad
_SetCursor
_SetResPurge
_StdTxMeas
_SetDateTime
_SetStdProcs
_StillDown
*_SetDefaultStartup A07E
_SetString
_StopAlert
*_SetDeskCPat
_SetTrapAddress
_StringWidth
*_SetDeviceAttribute AA2D
*_SetVideoDefault
*_StripAddress
_SetEmptyRgn
*_SetWinColor
*_SetEntries
_SetWindowPic
*_SwapMMUMode
_SetWRefCon
_SetFileInfo
_SetWTitle
_SetFilLock
*_SysEnvirons
_SetFilType
_ShieldCursor
_SetFontLock
_ShowControl
_SystemClick
_ShowCursor
_SystemEvent
_SetFScaleDisable
_ShowDItem
_SystemMenu
_SetGrowZone
_SystemTask
_TEActivate
*_TEStyleNew
_TEAutoView
_TECalText
_TEPinScroll
_TEDeactivate
_TESelView
_TextWidth
*_TEDispatch
_TESetJust
_TickCount
_TEDispose
_TESetSelect
*_TEGetOffset
_TESetText
_TrackControl
_TEGetText
_TestControl
_TrackGoAway
*_TestDeviceAttribute AA2C
_UnionRect
_UnlodeScrap
_UpdtDialog
_UnmountVol
_UprString
_Unique1ID
_UnpackBits
_UseResFile
_UpdateResFile
_UnloadSeg
_UpdtControl
_ValidRect
_WaitMouseUp
_WriteParam
_WriteResource
_ZeroScrap
_ZoomWindow
Below is a list of all system traps which represent multiple routines. These
traps decide which routine to execute by looking for a routine number: either on
the stack (stack-based) or in register D0 (register-based). All traps with the
exception of InternalWait expect the routine number to be passed as a 16-bit
unsigned word. InternalWait looks for a 32-bit routine number. To call an
individual routine, the routine number must be either pushed on the stack or
placed in register D0 (following the method expected by its parent trap). Note
that all Macintosh Packages (PACK) are stack-based.
********************************************************************************
LIST MANAGER
Stack-based
NOTE: First appeared in System 3.2
Sel = Routine Selector ID value (selects individual routine in the package)
-----------------
-----------------
-----------------
LAddColumn
LAddToCell
LAutoScroll
LSetSelect
LGetSelect
LLastClick
LDelColumn
********************************************************************************
********************************************************************************
DISK INITIALIZATION
Stack-based
-----------------
-----------------
-----------------
DIBadMount
********************************************************************************
STANDARD FILE
Stack-based
-----------------
-----------------
-----------------
SFPPutFile
SFPGetFile
********************************************************************************
FLOATING-POINT MATH
Stack-based
NOTE: The Standard Apple Numerics Environment (SANE) declares a second name for
this trap: _FP68K. SANE also requires the data type o
this is accomplished by setting certain high bits of the routine number
(and altering the 16-bit value). The numbers listed below, with all high
bits clear, will work for 80-bit extended-precision floating-point param-
eters. See the Apple Numerics Manual for more information.
-----------------
-----------------
-----------------
FOPROCENTRY
FOPROCEXIT
********************************************************************************
TRANSCENDENTAL FUNCTIONS
Stack-based
NOTE: SANE declares a second name for this trap: _Elems68K. Also, SANE treats
these routines in the same manner as FP68K / Pack4. See the Apple Numerics
Manual for more information.
-----------------
-----------------
-----------------
FOCOMPOUND
********************************************************************************
INTERNATIONAL UTILITIES
Stack-based
-----------------
-----------------
-----------------
IUDatePString
IUMagIDString
IUDateString
IUMagString
IUTimePString
IUTimeString
********************************************************************************
BINARY/DECIMAL CONVERSION
Stack-based
NOTE: SANE declares a second name for this trap:
_DecStr68K, and uses routines 2, 3, and 4. No high bits are
required by SANE for these routines, unlike packages 4 and 5.
-----------------
-----------------
-----------------
NumToString
StringToNum
********************************************************************************
_HFSDispatch
Register-based
-----------------
-----------------
-----------------
GetFCBInfo
SetCatInfo
SetVolInfo
GetCatInfo
********************************************************************************
_SCSIDispatch
Stack-based
-----------------
-----------------
-----------------
*SCSIMsgOut
SCSISelect
SCSIComplete
SCSIRBlind
SCSIWBlind
SCSIInstall
*SCSIMsgIn
*SCSISelAtn
********************************************************************************
*_InternalWait
basis unknown
NOTE: This trap was listed in Inside Macintosh without an accompanying description.
-----------------
-----------------
-----------------
SetTimeout
GetTimeout
********************************************************************************
*_ScriptUtil
stack-based [long]
NOTE: Routine number expected to be a 32-bit long integer on stack
-----------------
-----------------
-----------------
smChar2Pixel
smFontScript
smMeasureJust
smCharByte
smGetEnvirons
smPixel2Char
smCharType
smGetScript
smSetEnvirons
smDrawJust
smHiliteText
smSetScript
smFindWord
smIntlScript
smTranslit
smFont2Script
smKybdScript
********************************************************************************
*_Shutdown
Stack-based
-----------------
-----------------
-----------------
ShutDwnInstall
ShutDwnRemove
ShutDwnPower
ShutDwnStart
********************************************************************************
*_SlotManager
Register-based
-----------------
-----------------
-----------------
InitPRAMRecs
sFindsRsrcPtr
InitSDec1Mgr
sFindStruct
sReadDrvrName
InitsRsrcTable
sCalcsPointer
sGetcString
sGetDriver
sReadPBSize
sCardChanged
sReadPRAMRec
sCkCardStatus
sNextTypesRsrc
sReadStruct
sdeleteSRTRec
sOffsetData
sDisposePtr
sPrimaryInit
sPtrToSlot
sSearchSRT
sFindDevBase
sPutPRAMRec
sUpdateSRT
sFindsInfoRecPtr
sReadFHeader
********************************************************************************
Unit Table Entries (Device Driver)
Driver Name
Driver Name
--------------------------------
--------------------------------
[reserved]
.BOut (Printer port async out)
hard disk driver (MacXL/HD20)
.MPP (AppleTalk)
.ATP (AppleTalk)
[reserved]
.Sony (disk driver)
desk accessories in System file
.AIn (Modem port async in)
desk accessories in appl files
.AOut (Modem port async out)
SCSI drivers 0-7
.BIn (Printer port async in)
[reserved]
Font Numbers for Apple(R) Screen Fonts
-------------------
-------------------
[reserved]
[reserved]
[reserved]
[reserved]
[reserved]
[reserved]
[reserved]
Times Roman
San Francisco
Los Angeles
[reserved]
1. Font numbers 0-127 are reserved for future Apple fonts.
2. Font numbers 128-383 are reserved for vendor assignments.
3. Font numbers 384-511 available for use by anyone.
4. Old copies of Apple's Font/DA Mover (older than version 3.x) will not handle
fonts that have negative resource ID's (i.e. font numbers 256 and up),
affecting half the font numbers reserved for vendors and all of the general-
use font numbers.
Power-up/Reset Memory Tests
(PICT deleted)
When the Mac is first turned on, it performs several internal tests before
displaying the insert disk icon. Although Apple never published details about
these tests, this information was leaked to the public soon after the Mac's
introduction in 1984.
Every time the Mac performs a cold start, usually when power is first applied
(or even after a bad system crash), the boot code in the ROM executes 5 memory
tests. The first one is a ROM self-test, and the remaining four test the RAM.
If any of these tests fail, obviously the Mac in question will need logic board
repairs. To help their technicians diagnose the trouble, Apple distributed a
diagram similar to the one above.
The diagram was released for the first Mac motherboard, used in the old 128K and
512K Macs. To the best of my knowledge, Apple has not released diagrams for Macs
built with SIMM RAM modules (Mac Plus and all later models). But I do understand
that Apple used a chip-numbering system for SIMMs similar to the one used for
the soldered-in RAM chips of the original motherboards.
The sad-Mac screen is used to report memory test failures on all Mac models. The
sad-Mac screen itself is generated by the System Error Handler when it doesn't
have the normal system error box loaded (such as before the Mac can boot, or
after a bad enough crash). Below the sad-Mac icon are 6 hexadecimal digits which
describe the system error.
For memory test failures, the first two hex digits always report the test
number. The second pair of digits represent the chips in row 'G' on the mother-
board (see diagram), and the last pair of digits describe row 'H'. Starting from
the left, each bit corresponds to a particular chip. If the chip is bad, the bit
is set to '1', otherwise the bit is zero.
For system errors, the first pair of hex digits will always be a 0F. The last
four digits represent the error code (which will be the normal system error ID
code converted into hex). The table below lists both the 0F and its associated
error IDs (listed as processor errors):
Test Number and Description Table
Error Code
-------------------
----------------------------------------
ROM test failed
(meaningless)
Bus subtest
Identity of suspected bad RAM chip(s)
Identity of suspected bad RAM chip(s)
Identity of suspected bad RAM chip(s)
Add uniqueness
Identity of suspected bad RAM chip(s)
Exception MC68000 error
Processor error (listed below)
0001 Bus Error
0007 privilege violation
0002 address error
0008 trace
0003 illegal instruction
0009 A-trap
0004 zero divide
000A F-trap
0005 check instruction
000B other exceptions
0006 trapv instruction
000D NMI (interrupt button)
Standard ASCII Chart
This ASCII chart is labeled in hexadecimal. The ASCII character code for any
character is obtained by adding the character's row and column numbers, e.g.
ASCII code for "g" is 60+7 or $67 hex.
(PICT deleted)
ASCII Character Layout, Mac Plus Keyboard
(PICT deleted)
NOTE: Although there are several other Apple keyboard designs, the ASCII codes
generated by their keys will largely follow the pattern used by the Macintosh
Plus keyboard.
(PICT deleted)
Copyright &
Linux/m68k for Macintosh Project.

我要回帖

更多关于 xd股票是什么意思 的文章

 

随机推荐