mac-rom/QuickDraw/QDTrapInstall.a
Elliot Nunn 4325cdcc78 Bring in CubeE sources
Resource forks are included only for .rsrc files. These are DeRezzed into their data fork. 'ckid' resources, from the Projector VCS, are not included.

The Tools directory, containing mostly junk, is also excluded.
2017-12-26 09:52:23 +08:00

567 lines
18 KiB
Plaintext

;
; File: QDTrapInstall.a
;
; Contains: Trap definitions for Color QuickDraw.
;
; Written by: Bruce Leak
;
; Copyright: © 1989-1991 by Apple Computer, Inc., all rights reserved.
;
; Change History (most recent first):
;
; <20> 7/10/91 dba end of the forPost70 conditional; we are past 7.0 for good
; <19> 5/8/91 KON SetCCursor now in RAM because register A2 was getting trashed on
; multiple device systems.
; <18> 3/19/91 KON CSD, DTY: BRC# 84342, Patch ClosePort and CloseCPort so they jsr
; to the RAM version of DelPortList which no longer uses Munger
; (the ROM version does, and this can cause the wrong port to be
; deleted). This required reorganizing the QDciPatchROM file, so
; we made BitMaptoRgn a linked patch and no longer include it from
; here.
; <17> 1/25/91 KON DDG: BRC# 81599, Add SeedFill and CalcMask to list of installed
; traps.
; <16> 11/26/90 SMC Changed vector added in <15>. With BAL.
; <15> 10/31/90 SMC Added two vectors with BAL.
; <14> 9/7/90 KON Use RAM version of MapRgn so it doesn't remap wide open regions.
; Previously, caller (in Pictures and GWorlds) had to check for
; wide open.
; <13> 8/17/90 KON Added QDRstor macro so a ROM address can be specified when
; installing a trap. Currently, traps installed by this macro are
; commented out.\
; <12> 7/13/90 KON The StdRgn trap in ROM has a bug. Take the RAM version.
; <11> 5/30/90 KON Added trap install for KopyMask $AA51.
; <10> 5/29/90 KON Add DelSearch and DelComp to list of traps.
; <9> 4/23/90 EMT Removed routines properly patched by ROM78Fix.a, so we can
; consider them in ROM: StdRgn, DisposPixPat, DisposCCursor,
; CloseCPort, ClosePort.
; <8> 3/26/90 KON Fix call to comp procs in InvertColor, so InvertColor now runs
; out of RAM.
; <7> 2/20/90 BAL Now installs DisposGDevice to fix up lastTXGDevice if necessary.
; <6> 2/5/90 BAL Reordered list.
; <5> 1/30/90 DDG Changed the entry for ScrollRect so that it is run out of RAM,
; not ROM. (This is so the fixes for ScrollRect will be installed
; properly)
; <4> 1/4/90 EMT Removed even more routines in ROM!
; <3> 1/3/90 EMT (with BAL) Removed routines already in ROM.
; <2> 1/3/90 EMT (with BAL) Converted to QDEntry macro.
; <¥1.3> 7/14/89 BAL For Aurora: Final CQD
; <1.2> 6/30/89 BAL Added QDExtDispatch, NewTempBuffer, NewTempHandle,
; DisposeTempBuffer
; <¥1.1> 5/29/89 BAL Blasting in 32-Bit QuickDraw version 1.0 Final
; <1.0> 4/12/89 BAL Blasting in 32-Bit QuickDraw 1.0B1
;
; To Do:
; The following routines are identical to the Mac II ROM, but are not vectored:
; PutPicData, PutPicByte, PutPicWord, PutPicLong, PutPicRect, PutPicOp, PutPicOp2
; PutPicRgn, PutPicPad, PutPicPat, EqualPat, PutGray, InitShared, InsPortList,
; DelPortList.
; The following routines are identical to the Mac II ROM, are vectored, but not used:
; DPutPicByte, DPutPicOp, CheckPic
; The following routines have changed, but are not vectored either:
; PutPicVerb, PutPicPixPat, UpdatePat
; The following routines have not been checked:
; GetPicData, GetSByte, GetRect, GetPicOp, GetUByte, GetWord, GetLong, GetPicPixPat
; PicItem1 JSRs directly to SetFillPat - should use vector.
;
qdInROM EQU 0 ; For routines identical to Mac II ROM.
MACRO
QDEntry &num,&name,&cond
LCLA &doit
IF &cond = '' THEN
&doit SETA 1
ELSE
&doit SETA (&Eval(&cond)) OR installAllQD
ENDIF
IF &doit THEN
IMPORT &name
@&name DC.L &name-@&name
DC.W &num
ENDIF
ENDM
MACRO
QDRstor &num,&name,&cond
LCLA &doit
IF &cond = '' THEN
&doit SETA 1
ELSE
&doit SETA (&Eval(&cond)) OR installAllQD
ENDIF
IF &doit THEN
@&name DC.L &name
DC.W $8000+&num
ENDIF
ENDM
FirstTrap
QDEntry $14, SetFractEnable, installFont
QDEntry $17, CopyMask
QDEntry $34, SetFScaleDisable, installFont
QDEntry $35, FontMetrics, installFont
QDEntry $37, MeasureText, installText
QDEntry $38, CalcMask
QDEntry $39, SeedFill
QDEntry $50, InitCursor, qdInROM
QDEntry $51, SetCursor, qdInROM
QDEntry $52, HideCursor, qdInROM
QDEntry $53, ShowCursor, qdInROM
QDEntry $55, ShieldCursor, qdInROM
QDEntry $56, ObscureCursor, qdInROM
QDEntry $58, BitAnd, qdInROM
QDEntry $59, BitXOr, qdInROM
QDEntry $5A, BitNot, qdInROM
QDEntry $5B, BitOr, qdInROM
QDEntry $5C, BitShift, qdInROM
QDEntry $5D, BitTst, qdInROM
QDEntry $5E, BitSet, qdInROM
QDEntry $5F, BitClr, qdInROM
QDEntry $61, Random, qdInROM
QDEntry $62, ForeColor, qdInROM
QDEntry $63, BackColor, qdInROM
QDEntry $64, ColorBit, qdInROM
QDEntry $65, GetPixel
QDEntry $66, StuffHex, qdInROM
QDEntry $6D, InitPort
QDEntry $6E, InitGraf
QDEntry $6F, OpenPort
QDEntry $70, LocalToGlobal, qdInROM
QDEntry $71, GlobalToLocal, qdInROM
QDEntry $72, GrafDevice, qdInROM
QDEntry $73, SetPort, qdInROM
QDEntry $74, GetPort, qdInROM
QDEntry $75, SetPortBits, qdInROM
QDEntry $76, PortSize, qdInROM
QDEntry $77, MovePortTo, qdInROM
QDEntry $78, SetOrigin, qdInROM
QDEntry $79, SetClip, qdInROM
QDEntry $7A, GetClip, qdInROM
QDEntry $7B, ClipRect, qdInROM
QDEntry $7C, BackPat, qdInROM
QDEntry $7D, ClosePort
QDEntry $7E, AddPt, qdInROM
QDEntry $7F, SubPt, qdInROM
QDEntry $80, SetPt, qdInROM
QDEntry $81, EqualPt, qdInROM
QDEntry $82, StdText, installText
QDEntry $83, DrawChar, installText
QDEntry $84, DrawString, installText
QDEntry $85, DrawText, installText
QDEntry $86, TextWidth, installText
QDEntry $87, TextFont, installText
QDEntry $88, TextFace, installText
QDEntry $89, TextMode, installText
QDEntry $8A, TextSize, installText
QDEntry $8B, GetFontInfo, installText
QDEntry $8C, StringWidth, installText
QDEntry $8D, CharWidth, installText
QDEntry $8E, SpaceExtra, installText
QDEntry $90, StdLine
QDEntry $91, LineTo, qdInROM
QDEntry $92, Line, qdInROM
QDEntry $93, MoveTo, qdInROM
QDEntry $94, Move, qdInROM
QDEntry $96, HidePen, qdInROM
QDEntry $97, ShowPen, qdInROM
QDEntry $98, GetPenState, qdInROM
QDEntry $99, SetPenState, qdInROM
QDEntry $9A, GetPen, qdInROM
QDEntry $9B, PenSize, qdInROM
QDEntry $9C, PenMode, qdInROM
QDEntry $9D, PenPat, qdInROM
QDEntry $9E, PenNormal, qdInROM
QDEntry $A0, StdRect
QDEntry $A1, FrameRect, qdInROM
QDEntry $A2, PaintRect, qdInROM
QDEntry $A3, EraseRect, qdInROM
QDEntry $A4, InvertRect, qdInROM
QDEntry $A5, FillRect, qdInROM
QDEntry $A6, EqualRect, qdInROM
QDEntry $A7, SetRect, qdInROM
QDEntry $A8, OffSetRect, qdInROM
QDEntry $A9, InSetRect, qdInROM
QDEntry $AA, SectRect, qdInROM
QDEntry $AB, UnionRect, qdInROM
QDEntry $AC, Pt2Rect, qdInROM
QDEntry $AD, PtInRect, qdInROM
QDEntry $AE, EmptyRect, qdInROM
QDEntry $AF, StdRRect
QDEntry $B0, FrameRoundRect, qdInROM
QDEntry $B1, PaintRoundRect, qdInROM
QDEntry $B2, EraseRoundRect, qdInROM
QDEntry $B3, InvertRoundRect, qdInROM
QDEntry $B4, FillRoundRect, qdInROM
QDEntry $B6, StdOval
QDEntry $B7, FrameOval, qdInROM
QDEntry $B8, PaintOval, qdInROM
QDEntry $B9, EraseOval, qdInROM
QDEntry $BA, InvertOval, qdInROM
QDEntry $BB, FillOval, qdInROM
QDEntry $BD, StdArc
QDEntry $BE, FrameArc, qdInROM
QDEntry $BF, PaintArc, qdInROM
QDEntry $C0, EraseArc, qdInROM
QDEntry $C1, InvertArc, qdInROM
QDEntry $C2, FillArc, qdInROM
QDEntry $C3, PtToAngle, qdInROM
QDEntry $C5, StdPoly
QDEntry $C6, FramePoly, qdInROM
QDEntry $C7, PaintPoly, qdInROM
QDEntry $C8, ErasePoly, qdInROM
QDEntry $C9, InvertPoly, qdInROM
QDEntry $CA, FillPoly, qdInROM
QDEntry $CB, OpenPoly, qdInROM
QDEntry $CC, ClosePoly, qdInROM
QDEntry $CD, KillPoly, qdInROM
QDEntry $CE, OffSetPoly, qdInROM
QDEntry $CF, PackBits, qdInROM
QDEntry $D0, UnpackBits, qdInROM
QDEntry $D1, StdRgn
QDEntry $D2, FrameRgn, qdInROM
QDEntry $D3, PaintRgn, qdInROM
QDEntry $D4, EraseRgn, qdInROM
QDEntry $D5, InvertRgn, qdInROM
QDEntry $D6, FillRgn, qdInROM
QDEntry $D7, BitMapRgn, qdInROM
QDEntry $D8, NewRgn
QDEntry $D9, DisposeRgn, qdInROM
QDEntry $DA, OpenRgn, qdInROM
QDEntry $DB, CloseRgn
QDEntry $DC, CopyRgn, qdInROM
QDEntry $DD, SetEmptyRgn, qdInROM
QDEntry $DE, SetRectRgn, qdInROM
QDEntry $DF, RectRgn, qdInROM
QDEntry $E0, OffSetRgn, qdInROM
QDEntry $E1, InSetRgn, qdInROM
QDEntry $E2, EmptyRgn, qdInROM
QDEntry $E3, EqualRgn, qdInROM
QDEntry $E4, SectRgn, qdInROM
QDEntry $E5, UnionRgn, qdInROM
QDEntry $E6, DiffRgn, qdInROM
QDEntry $E7, XOrRgn, qdInROM
QDEntry $E8, PtInRgn, qdInROM
QDEntry $E9, RectInRgn, qdInROM
QDEntry $EA, SetStdProcs, qdInROM
QDEntry $EB, StdBits
QDEntry $EC, CopyBits
QDEntry $ED, StdTxMeas, installText
QDEntry $EE, StdGetPic, qdInROM
QDEntry $EF, ScrollRect
QDEntry $F0, StdPutPic, qdInROM
QDEntry $F1, StdComment, qdInROM
QDEntry $F2, PicComment, qdInROM
QDEntry $F3, OpenPicture
QDEntry $F4, ClosePicture
QDEntry $F5, KillPicture, qdInROM
QDEntry $F6, DrawPicture
QDEntry $F8, ScalePt, qdInROM
QDEntry $F9, MapPt, qdInROM
QDEntry $FA, MapRect, qdInROM
QDEntry $FB, MapRgn
QDEntry $FC, MapPoly, qdInROM
QDEntry $FE, InitFonts, installFont
QDEntry $FF, GetFontName, installFont
QDEntry $101, FMSwapFont, installFont
QDEntry $102, RealFont, installFont
QDEntry $103, SetFontLock, installFont
QDEntry $200, OpenCPort, addrModeFlag
QDEntry $201, InitCPort, addrModeFlag
QDEntry $202, CloseCPort
QDEntry $203, NewPixMap, addrModeFlag
QDEntry $204, DisposPixMap
QDEntry $205, CopyPixMap, addrModeFlag
QDEntry $206, SetCPortPix, qdInROM
QDEntry $207, NewPixPat, qdInROM
QDEntry $208, DisposPixPat, qdInROM
QDEntry $209, CopyPixPat, qdInROM
QDEntry $20A, PenPixPat, qdInROM
QDEntry $20B, BackPixPat, qdInROM
QDEntry $20C, GetPixPat
QDEntry $20D, MakeRGBPat, qdInROM
QDEntry $20E, FillCRect, qdInROM
QDEntry $20F, FillCOval, qdInROM
QDEntry $210, FillCRoundRect, qdInROM
QDEntry $211, FillCArc, qdInROM
QDEntry $212, FillCRgn, qdInROM
QDEntry $213, FillCPoly, qdInROM
QDEntry $214, RGBForeColor
QDEntry $215, RGBBackColor
QDEntry $216, SetCPixel, qdInROM
QDEntry $217, GetCPixel
QDEntry $218, GetCTable
QDEntry $219, GetForeColor, qdInROM
QDEntry $21A, GetBackColor, qdInROM
QDEntry $21B, GetCCursor
QDEntry $21C, SetCCursor
QDEntry $21D, AllocCursor, qdInROM
QDEntry $21E, GetCIcon
QDEntry $21F, PlotCIcon
QDEntry $220, OpenCPicture
QDEntry $221, OpColor, qdInROM
QDEntry $222, HiliteColor, qdInROM
QDEntry $223, CharExtra, installText
QDEntry $226, DisposCCursor, qdInROM
QDEntry $22E, InitGDevice
QDEntry $22F, NewGDevice, qdInROM
QDEntry $230, DisposGDevice
QDEntry $231, SetGDevice, qdInROM
QDEntry $232, GetGDevice, qdInROM
QDEntry $233, Color2Index
QDEntry $234, Index2Color
QDEntry $235, InvertColor
QDEntry $236, RealColor, qdInROM
QDEntry $237, GetSubTable, qdInROM
QDEntry $238, UpdatePixMap, qdInROM
QDEntry $239, MakeITable
QDEntry $23A, AddSearch
QDEntry $23B, AddComp
QDEntry $23C, SetClientID, qdInROM
QDEntry $23D, ProtectEntry, qdInROM
QDEntry $23E, ReserveEntry, qdInROM
QDEntry $23F, SetEntries
QDEntry $24A, RestoreEntries
QDEntry $24C, DelSearch
QDEntry $24D, DelComp
QDEntry $24F, CalcCMask
QDEntry $250, SeedCFill
QDEntry $251, KopyMask
QDEntry $290, InitPalettes
QDEntry $291, NewPalette
QDEntry $292, GetNewPalette
QDEntry $293, DisposePalette
QDEntry $294, ActivatePalette
QDEntry $295, SetPalette
QDEntry $296, GetPalette
QDEntry $297, PmForeColor
QDEntry $298, PmBackColor
QDEntry $299, AnimateEntry
QDEntry $29A, AnimatePalette
QDEntry $29B, GetEntryColor
QDEntry $29C, SetEntryColor
QDEntry $29D, GetEntryUsage
QDEntry $29E, SetEntryUsage
QDEntry $29F, CTab2Palette
QDEntry $2A0, Palette2CTab
QDEntry $2A1, CopyPalette
QDEntry $2A2, PMgrDispatch
QDEntry $300, BitBlt
QDEntry $301, BitsToMap, qdInROM
QDEntry $302, BitsToPix
QDEntry $303, JacksonPollock
QDEntry $304, ColorMap
QDEntry $305, CopyHandle, qdInROM
QDEntry $306, CullPoints, qdInROM
QDEntry $307, DPutPicByte
QDEntry $308, DPutPicOp
QDEntry $309, DrawArc
QDEntry $30A, DrawLine
QDEntry $30B, DrawSlab
QDEntry $30C, FastSlabMode
QDEntry $30D, GetSeek
QDEntry $30E, MakeScaleTbl
QDEntry $30F, CheckPic
QDEntry $310, DoLine
QDEntry $311, OldPatToNew, qdInROM
QDEntry $312, PackRgn, qdInROM
QDEntry $313, PatConvert
QDEntry $314, PatDither
QDEntry $315, PatExpand
QDEntry $316, PinIt, qdInROM
QDEntry $317, PortToMap, qdInROM
QDEntry $318, PushVerb, qdInROM
QDEntry $319, PutLine
QDEntry $31A, PutOval
QDEntry $31B, PutRgn
QDEntry $31C, NewTempBuffer
QDEntry $31D, QDExtDispatcher
QDEntry $31E, DisposeTempBuffer
QDEntry $31F, RgnBlt
QDEntry $320, RgnOp, qdInROM
QDEntry $321, RSect, qdInROM
QDEntry $322, SeekRgn
QDEntry $323, SetFillPat, qdInROM
QDEntry $324, SetUpStretch
QDEntry $325, SlabMode
QDEntry $326, SortPoints, qdInROM
QDEntry $327, StretchBits
QDEntry $328, StdDevLoop
QDEntry $329, TrimRect
QDEntry $32A, XorSlab
QDEntry $32b, ExTbl
; QDEntry $32c
QDEntry $32d, NewTempHandle
QDEntry $32e, PatExTbl
; QDEntry $32f
QDEntry $330, bMAIN0
QDEntry $331, bMAIN1
QDEntry $332, bMAIN2
QDEntry $333, bMAIN3
QDEntry $334, bSETUP8
QDEntry $335, bMAIN9
QDEntry $336, bSETUP10
QDEntry $337, bMAIN11
QDEntry $338, bXMAIN8
QDEntry $339, bXMAIN9
QDEntry $33A, bXMAIN10
QDEntry $33B, bXMAIN11
QDEntry $33C, bcMain0
QDEntry $33D, bcMain1
QDEntry $33E, bHilite
QDEntry $33F, bcMain3
QDEntry $340, bEND0
QDEntry $341, bEND1
QDEntry $342, bEND2
QDEntry $343, bEND3
QDEntry $344, bLONG8
QDEntry $345, bEND9
QDEntry $346, bEND10
QDEntry $347, bEND11
QDEntry $348, bXLONG8
QDEntry $349, bXEND9
QDEntry $34A, bXEND10
QDEntry $34B, bXEND11
QDEntry $34C, bcEnd0
QDEntry $34D, bcEnd1
QDEntry $34E, bSloHilite
QDEntry $34F, bcEnd3
QDEntry $350, bAvg
bAddPinInMacII EQU $1BC6A
bAddOverInMacII EQU $1BBF4
bSubPinInMacII EQU $1BD7C
bTransparentInMacII EQU $1C0B0
bMaxInMacII EQU $1BE18
bSubOverInMacII EQU $1BD06
bMinInMacII EQU $1BE9E
; QDRstor $351, bAddPinInMacII
QDEntry $351, bAddPin
; QDRstor $352, bAddOverInMacII
QDEntry $352, bAddOver
; QDRstor $353, bSubPinInMacII
QDEntry $353, bSubPin
; QDRstor $354, bTransparentInMacII
QDEntry $354, bTransparent
; QDRstor $355, bMaxInMacII
QDEntry $355, bMax
; QDRstor $356, bSubOverInMacII
QDEntry $356, bSubOver
; QDRstor $357, bMinInMacII
QDEntry $357, bMin
QDEntry $358, bSetup0
QDEntry $359, bLeft0
QDEntry $35A, rMASK0
QDEntry $35B, rMASK1
QDEntry $35C, rMASK2
QDEntry $35D, rMASK3
QDEntry $35E, rMASK8
QDEntry $35F, rMASK9
QDEntry $360, rMASK10
QDEntry $361, rMASK11
QDEntry $362, rXMASK8
QDEntry $363, rXMASK9
QDEntry $364, rXMASK10
QDEntry $365, rXMASK11
QDEntry $366, rAvg
QDEntry $367, rAddPin
QDEntry $368, rAddOver
QDEntry $369, rSubPin
QDEntry $36A, rTransparent
QDEntry $36B, rMax
QDEntry $36C, rSubOver
QDEntry $36D, rMin
QDEntry $36E, rcMask0
QDEntry $36F, rcMask1
QDEntry $370, rslowHilite
QDEntry $371, rcMask3
QDEntry $372, rHilite
QDEntry $373, stMASK0
QDEntry $374, stMASK1
QDEntry $375, stMASK2
QDEntry $376, stMASK3
QDEntry $377, stAvg
QDEntry $378, stAddPin
QDEntry $379, stAddOver
QDEntry $37A, stSubPin
QDEntry $37B, stTransparent
QDEntry $37C, stMax
QDEntry $37D, stSubOver
QDEntry $37E, stMin
QDEntry $37F, stHilite
QDEntry $380, slMASK8
QDEntry $381, slMASK9
QDEntry $382, slMASK10
QDEntry $383, slMASK11
QDEntry $384, slXMASK8
QDEntry $385, slXMASK9
QDEntry $386, slXMASK10
QDEntry $387, slXMASK11
QDEntry $388, slAvg
QDEntry $389, slAddPin
QDEntry $38A, slAddOver
QDEntry $38B, slSubPin
QDEntry $38C, slTransparent
QDEntry $38D, slMax
QDEntry $38E, slSubOver
QDEntry $38F, slMin
QDEntry $390, slHilite
QDEntry $391, ITabMatch
QDEntry $392, ColorThing2Index
; QDEntry $393, (Pollock)
QDEntry $394, AllocRunBuf
QDEntry $395, InitRgn
QDEntry $396, ScaleBlt
QDEntry $397, stNoStack
QDEntry $398, BlitCase
QDEntry $399, stScanLoop
QDEntry $39A, PicItem1
QDEntry $39B, MakeGrayItab
QDEntry $39C, FastLine
QDEntry $39D, FastSlant
QDEntry $39e, BitsDevLoop
; QDEntry $39f
QDEntry $3a0, rArith16Tab
QDEntry $3a1, rArith32Tab
QDEntry $3a2, rHiliteTab
QDEntry $3a3, gsRunTbl
QDEntry $3a4, gsExpTbl
QDEntry $3a5, gsSeekTbl
QDEntry $3a6, stArith16Tab
QDEntry $3a7, stArith32Tab
QDEntry $3a8, stColorTab
QDEntry $3a9, stGrayTab
QDEntry $3aa, stSearchTab
QDEntry $3ab, ScaleIndexedToIndexed
QDEntry $3ac, scIndTab1
QDEntry $3ad, scIndTab2
QDEntry $3ae, scIndTab4
QDEntry $3af, scIndTab8
QDEntry $3b0, scIndTab16
QDEntry $3b1, scIndTab32
QDEntry $3b2, scDirTab1
QDEntry $3b3, scDirTab2
QDEntry $3b4, scDirTab4
QDEntry $3b5, scDirTab8
QDEntry $3b6, scDirTab16
QDEntry $3b7, scDirTab32
QDEntry $3b8, bArith16Tab
QDEntry $3b9, bArith32Tab
QDEntry $3ba, bHiliteTab
QDEntry $3bb, bArith16Setup
QDEntry $3bc, bArith32Setup
QDEntry $3bd, slArith16Tab
QDEntry $3be, slArith32Tab
; QDEntry $3bf
QDEntry $3c0, AlphaDispatch
QDEntry $3c1, StreamToMask
; QDEntry $3c2
; QDEntry $3c3
QDEntry $3c4, GetPMData
; QDEntry $3c5
; QDEntry $3c6
; QDEntry $3c7
; QDEntry $3c8, (QD2Utils)
QDEntry $3F8, StdOpcodeProc
LastTrap