supermario/bin/MPW-3.2.3/Interfaces/AIncludes/PackMacs.a
2019-06-29 22:17:03 +08:00

598 lines
17 KiB
Plaintext

; Version: 3.05
; Created: Friday, October 20, 1989 at 9:32:54 PM
;
; File: PackMacs.a
;
; Assembler Interface to the Macintosh Libraries
; Copyright Apple Computer, Inc. 1984-1990
; All Rights Reserved
;
;--------------------------------------------------------------------
;
; Package Equates -- This file defines the high-level equates for the
; Standard File, Disk Initialization, International Utilities, and
; Binary-Decimal Conversion packages, and the List Manager. The equates
; for the Floating-PointArithmetic and Transcendental Functions packages
; can be found in SANEMacs.a.
;--------------------------------------------------------------------
IF &TYPE('__IncludingPackMacs__') = 'UNDEFINED' THEN
__IncludingPackMacs__ SET 1
listMgr EQU 0 ; List Manager
; 1 reserved for use by Apple Computer, Inc.
dskInit EQU 2 ; Disk Initialization
stdFile EQU 3 ; Standard File
flPoint EQU 4 ; Floating-Point Arithmetic
trFunc EQU 5 ; Transcendental Functions
intUtil EQU 6 ; International Utilities
bdConv EQU 7 ; Binary/Decimal Conversion
; Equates for DISK INITIALIZATION PACKAGE
; Routine selectors
diLoad EQU 2
diUnload EQU 4
diBadMount EQU 0
diFormat EQU 6
diVerify EQU 8
diZero EQU 10
; Result codes are defined in SysEqu.a
; Equates for INTERNATIONAL PACKAGE
; Routine selectors
iuGetIntl EQU 6
iuSetIntl EQU 8
iuDateString EQU 0
iuDatePString EQU 14
iuTimeString EQU 2
iuTimePString EQU 16
iuMetric EQU 4
iuMagString EQU 10
iuMagIDString EQU 12
iuLDateString EQU 20 ; <1.1>
iuLTimeString EQU 22 ; <1.1>
iuClearCache EQU 24 ; <1.1>
iuMagPString EQU 26 ; <1.1>
iuMagIDPString EQU 28 ; <1.1>
iuScriptOrder EQU 30 ; <1.1>
iuLangOrder EQU 32 ; <1.1>
iuTextOrder EQU 34 ; <1.1>
iuGetItlTable EQU 36 ; <1.3>
; Data structures for International Utilities
; International 0 record
decimalPt EQU 0 ; decimal point character <11>
thousSep EQU 1 ; thousands separator character <11>
listSep EQU 2 ; list separator character <11>
currSym EQU 3 ; currency symbol (3 bytes long) <11>
currFmt EQU 6 ; currency format flags
dateOrder EQU 7 ; order of short date elements: mdy, dmy, etc. <11>
shrtDateFmt EQU 8 ; format flags for each short date element <11>
dateSep EQU 9 ; date separator character <11>
timecycle EQU 10 ; specifies time cycle: 0..23, 1..12, or 0..11 <11>
timeFmt EQU 11 ; format flags for each time element <11>
mornStr EQU 12 ; trailing string for AM if 12-hour cycle <11>
eveStr EQU 16 ; trailing string for PM if 12-hour cycle <11>
timeSep EQU 20 ; time separator character <11>
timeSuff EQU 21 ; trailing string for AM if 24-hour cycle <11>
; (first 4 bytes); trailing string for PM
; if 24-hour cycle (second 4 bytes)
metricSys EQU 29 ; $FF if metric, 0 if inches etc. <11>
intl0Vers EQU 30 ; region code (hi byte) and version (lo byte) <11>
; International 1 record (added comments <11>)
days EQU 0 ; day names
months EQU 112 ; month names
suppressDay EQU 304 ; 255 for no day, or flags to suppress any element
lngDateFmt EQU 305 ; order of long date elements
dayLeading0 EQU 306 ; 255 for leading 0 in day number
abbrLen EQU 307 ; length for abbreviating names
st0 EQU 308 ; separator strings for long date format
st1 EQU 312
st2 EQU 316
st3 EQU 320
st4 EQU 324
intl1Vers EQU 328 ; region code (hi byte) and version (lo byte)
localRtn EQU 330 ; now a flag for optional extension
; Constants for manipulation of international resources
; Way to specify desired date format
shortDate EQU 0
longDate EQU 1
abbrevDate EQU 2
; Masks used for setting and testing currency format flags
currLeadingZ EQU 128 ; set if leading zero
currTrailingZ EQU 64 ; set if trailing zero
currNegSym EQU 32 ; set if minus sign for negative num, reset if parentheses}
currSymLead EQU 16 ; set if currency symbol leads, reset if trails}
zeroCycle EQU 1 ; 0:00 AM/PM format
; Constants specifying absolute value of short date form
mdy EQU 0 ; month,day,year
dmy EQU 1 ; day,month,year
ymd EQU 2 ; year,month,day
myd EQU 3 ; month, day, year
dym EQU 4 ; day, year, month
ydm EQU 5 ; year, day, month
longDay EQU 0 ; day of month
longWeek EQU 1 ; day of week
longMonth EQU 2 ; month of year
longYear EQU 3 ; year
supDay EQU 1 ; suppress day of month
supWeek EQU 2 ; suppress day of week
supMonth EQU 4 ; suppress month
supYear EQU 8 ; suppress year
; Masks used for date element format flags
century EQU 128 ; set if century, reset if no century
mntLdingZ EQU 64 ; set if leading 0 for month
dayLdingZ EQU 32 ; set if leading zero for day
; Masks used for time element format flags
hrLeadingZ EQU 128 ; set if leading zero for hours
minLeadingZ EQU 64 ; set if leading zero for minutes
secLeadingZ EQU 32 ; set if leading zero for seconds
; Region codes for localized versions
verUS EQU 0
verFrance EQU 1
verBritain EQU 2
verGermany EQU 3
verItaly EQU 4
verNetherlands EQU 5
verFrBelgiumLux EQU 6 ; French for Belgium & Luxembourg <8>
verSweden EQU 7
verSpain EQU 8
verDenmark EQU 9
verPortugal EQU 10
verFrCanada EQU 11
verNorway EQU 12
verIsrael EQU 13
verJapan EQU 14
verAustralia EQU 15
verArabic EQU 16 ; synonym for verArabia <7>
verFinland EQU 17
verFrSwiss EQU 18 ; French Swiss <11>
verGrSwiss EQU 19 ; German Swiss <11>
verGreece EQU 20
verIceland EQU 21
verMalta EQU 22
verCyprus EQU 23
verTurkey EQU 24
verYugoCroatian EQU 25 ; Croatian system for Yugoslavia <8>
verIndiaHindi EQU 33 ; Hindi system for India <8>
verPakistan EQU 34 ; <2>
verLithuania EQU 41 ; <2>
verPoland EQU 42 ; <2>
verHungary EQU 43 ; <2>
verEstonia EQU 44 ; <2>
verLatvia EQU 45 ; <2>
verLapland EQU 46 ; <2>
verFaeroeIsl EQU 47 ; <2>
verIran EQU 48 ; <2>
verRussia EQU 49 ; <2>
verIreland EQU 50 ; English-language version for Ireland <2><11>
verKorea EQU 51 ; <2>
verChina EQU 52 ; <2>
verTaiwan EQU 53 ; <2>
verThailand EQU 54 ; <2>
; Obsolete region code names, kept for backward compatibility (moved here <11>)
verBelgiumLux EQU 6 ; (use verFrBelgiumLux instead, less ambiguous) <8>
verArabia EQU 16
verYugoslavia EQU 25 ; (use verYugoCroatian instead, less ambiguous) <8>
verIndia EQU 33 ; (use verIndiaHindi instead, less ambiguous) <2><8>
; Special script code values for International Utilities <1.2>
iuSystemScript EQU -1 ; system script
iuCurrentScript EQU -2 ; current script (for font of grafPort)
; Special language code values for International Utilities <1.2>
iuSystemCurLang EQU -2 ; current (itlb) lang for system script
iuSystemDefLang EQU -3 ; default lang for system script
iuCurrentCurLang EQU -4 ; current (itlb) lang for current script
iuCurrentDefLang EQU -5 ; default lang for current script
iuScriptCurLang EQU -6 ; current (itlb) lang for specified script
iuScriptDefLang EQU -7 ; default lang for specified script
; Table selectors for GetItlTable (added comments <11>)
iuWordSelectTable EQU 0 ; get word select break table from 'itl2'
iuWordWrapTable EQU 1 ; get word wrap break table from 'itl2'
iuNumberPartsTable EQU 2 ; get default number parts table from 'itl4'
iuUnTokenTable EQU 3 ; get unToken table from 'itl4' <9>
iuWhiteSpaceList EQU 4 ; get white space list from 'itl4' <10>
; Equates for BINARY-DECIMAL CONVERSION PACKAGE
; Routine selectors
numToString EQU 0
stringToNum EQU 1
; List Manager Equates
rView EQU 0 ; Rect in which we are viewed
port EQU 8 ; Grafport that owns us
indent EQU 12 ; Indent line/fields in cell
cellSize EQU 16 ; Cell size
visible EQU 20 ; lines/fields visible bounds
vScroll EQU 28 ; vertical scroll bar (or NIL)
hScroll EQU 32 ; horizontal scroll bar (or NIL)
selFlags EQU 36 ; Multiple selections allowed
lActive EQU 37 ; active or inactive boolean
lReserved EQU 38 ; private flags used internally
listFlags EQU 39 ; autoscrolling flags, etc.
clikTime EQU 40 ; time of last click
clikLoc EQU 44 ; position of last click
mouseLoc EQU 48 ; current position of mouse
lClikLoop EQU 52 ; routine to call during ListClick
lastClick EQU 56 ; the last cell that was clicked in
refCon EQU 60 ; reference value
listDefHandle EQU 64 ; Handle to list defproc
userHandle EQU 68 ; general storage for user
dataBounds EQU 72 ; Bounds of lines/fields
cells EQU 80 ; Handle to data
maxIndex EQU 84 ; index of lastcell + 1
cellArray EQU 86 ; offsets to cells
sizeList EQU 86 ; size sans selections
; these are equates for accessing the SelFlags byte
; All flags are true if one
lOnlyOne EQU 7 ; 0 = multiple selections, 1 = one
lExtendDrag EQU 6 ; 1 = drag select without shift key
lNoDisjoint EQU 5 ; 1 = turn off selections on click
lNoExtend EQU 4 ; 1 = don't extend shift selections
lNoRect EQU 3 ; 1 = don't grow (shift,drag) selection as rect
lUseSense EQU 2 ; 1 = shift should use sense of start cell
lNoNilHilite EQU 1 ; 1 = don't hilite empty cells
; these are bit numbers within the listFlags byte
; All flags are true if one
lDoVAutoscroll EQU 1 ; 1 = allow vertical autoscrolling
lDoHAutoscroll EQU 0 ; 1 = allow horizontal autoscrolling
; these are the messages sent to a list defproc
lInitMsg EQU 0 ; tell drawing routines to init themselves
lDrawMsg EQU 1 ; draw (and de/select) the indicated data
lHiliteMsg EQU 2 ; invert hilite state of specified cell
lCloseMsg EQU 3 ; shut down, the list is being disposed
; For package invocation
; First arg is routine selector, second is the trap
MACRO
_PackCall
MOVE.W &SYSLIST[1],-(SP)
&SYSLIST[2]
ENDM
;QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ
; Disk Initialization
;QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ
MACRO
_DILoad
_PackCall #DILoad,_Pack2
ENDM
MACRO
_DIUnLoad
_PackCall #DIUnLoad,_Pack2
ENDM
MACRO
_DIBadMount
_PackCall #DIBadMount,_Pack2
ENDM
MACRO
_DIFormat
_PackCall #DIFormat,_Pack2
ENDM
MACRO
_DIVerify
_PackCall #DIVerify,_Pack2
ENDM
MACRO
_DIZero
_PackCall #DIZero,_Pack2
ENDM
;QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ
; International Utilities
;QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ
MACRO
_IUGetIntl
_PackCall #IUGetIntl,_Pack6
ENDM
MACRO
_IUSetIntl
_PackCall #IUSetIntl,_Pack6
ENDM
MACRO
_IUDateString
_PackCall #IUDateString,_Pack6
ENDM
MACRO
_IUDatePString
_PackCall #IUDatePString,_Pack6
ENDM
MACRO
_IUTimeString
_PackCall #IUTimeString,_Pack6
ENDM
MACRO
_IUTimePString
_PackCall #IUTimePString,_Pack6
ENDM
MACRO
_IUMetric
_PackCall #IUMetric,_Pack6
ENDM
MACRO
_IUMagString
_PackCall #IUMagString,_Pack6
ENDM
MACRO
_IUMagIDString
_PackCall #IUMagIDString,_Pack6
ENDM
MACRO
_IULDateString ; <1.1>
_PackCall #IULDateString,_Pack6
ENDM
MACRO
_IULTimeString ; <1.1>
_PackCall #IULTimeString,_Pack6
ENDM
MACRO
_IUClearCache ; <1.1>
_PackCall #IUClearCache,_Pack6
ENDM
MACRO
_IUMagPString ; <1.1>
_PackCall #IUMagPString,_Pack6
ENDM
MACRO
_IUMagIDPString ; <1.1>
_PackCall #IUMagIDPString,_Pack6
ENDM
MACRO
_IUScriptOrder ; <1.1>
_PackCall #IUScriptOrder,_Pack6
ENDM
MACRO
_IULangOrder ; <1.1>
_PackCall #IULangOrder,_Pack6
ENDM
MACRO
_IUTextOrder ; <1.1>
_PackCall #IUTextOrder,_Pack6
ENDM
MACRO
_IUGetItlTable ; <1.3>
_PackCall #IUGetItlTable,_Pack6
ENDM
;QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ
; Binary-Decimal Conversion
;QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ
MACRO
_StringToNum
_PackCall #stringToNum,_Pack7
ENDM
MACRO
_NumToString
_PackCall #numToString,_Pack7
ENDM
;---------------------------------------------------------------------------
;
; These are the definitions for the List Manager calls
; implemented as Pack0.
;
;---------------------------------------------------------------------------
lActivate EQU 0
lAddColumn EQU 4
lAddRow EQU 8
lAddToCell EQU 12
lAutoScroll EQU 16
lCellSize EQU 20
lClick EQU 24
lClrCell EQU 28
lDelColumn EQU 32
lDelRow EQU 36
lDispose EQU 40
lDoDraw EQU 44
lDraw EQU 48
lFind EQU 52
lGetCell EQU 56
lGetSelect EQU 60
lLastClick EQU 64
lNew EQU 68
lNextCell EQU 72
lRect EQU 76
lScroll EQU 80
lSearch EQU 84
lSetCell EQU 88
lSetSelect EQU 92
lSize EQU 96
lUpdate EQU 100
MACRO
_LActivate
_PackCall #lActivate,_Pack0
ENDM
MACRO
_LAddColumn
_PackCall #lAddColumn,_Pack0
ENDM
MACRO
_LAddRow
_PackCall #lAddRow,_Pack0
ENDM
MACRO
_LAddToCell
_PackCall #lAddToCell,_Pack0
ENDM
MACRO
_LAutoScroll
_PackCall #lAutoScroll,_Pack0
ENDM
MACRO
_LCellSize
_PackCall #lCellSize,_Pack0
ENDM
MACRO
_LClick
_PackCall #lClick,_Pack0
ENDM
MACRO
_LClrCell
_PackCall #lClrCell,_Pack0
ENDM
MACRO
_LDelColumn
_PackCall #lDelColumn,_Pack0
ENDM
MACRO
_LDelRow
_PackCall #lDelRow,_Pack0
ENDM
MACRO
_LDispose
_PackCall #lDispose,_Pack0
ENDM
MACRO
_LDoDraw
_PackCall #lDoDraw,_Pack0
ENDM
MACRO
_LDraw
_PackCall #lDraw,_Pack0
ENDM
MACRO
_LFind
_PackCall #lFind,_Pack0
ENDM
MACRO
_LGetCell
_PackCall #lGetCell,_Pack0
ENDM
MACRO
_LGetSelect
_PackCall #lGetSelect,_Pack0
ENDM
MACRO
_LLastClick
_PackCall #lLastClick,_Pack0
ENDM
MACRO
_LNew
_PackCall #lNew,_Pack0
ENDM
MACRO
_LNextCell
_PackCall #lNextCell,_Pack0
ENDM
MACRO
_LRect
_PackCall #lRect,_Pack0
ENDM
MACRO
_LScroll
_PackCall #lScroll,_Pack0
ENDM
MACRO
_LSearch
_PackCall #lSearch,_Pack0
ENDM
MACRO
_LSetCell
_PackCall #lSetCell,_Pack0
ENDM
MACRO
_LSetSelect
_PackCall #lSetSelect,_Pack0
ENDM
MACRO
_LSize
_PackCall #lSize,_Pack0
ENDM
MACRO
_LUpdate
_PackCall #lUpdate,_Pack0
ENDM
ENDIF ; ...already included