Apple IIgs Toolbox Reference

Documented Parameters Status: 67% (845/1255)

Display Mode:

Contents - By Tool Set



Toolbox Reference - By Tool Set






Tool Locator




Tool Locator Calls
Routine#Description
TLBootInit$0101Initializes Tool Locator and all other ROM-based tools sets - not called by application
TLStartUp$0201Starts up the Tool Locator for use by an application
TLShutDown$0301Shuts down the Tool Locator when an application quits
TLVersion$0401Returns the version number of the Tool Locator
TLReset$0501Resets the Tool Locator & all other ROM-based tool sets on system reset - not by appl.
TLStatus$0601Indicates whether Tool Locator is active
GetTSPtr$0901Returns the pointer to the function pointer table of a specified tool set
SetTSPtr$0A01Installs the pointer to a function ptr table in the appropriate tool pointer table
GetFuncPtr$0B01Returns entry in the function ptr table for a specified function in a specified tool set
GetWAP$0C01Gets the pointer to the work area for a specified tool set
SetWAP$0D01Sets the pointer to the work area for a specified tool set
LoadTools$0E01Ensures that specified system tool sets are available & have specified minimum version numbers
LoadOneTool$0F01Ensures that specified system tool set is available & has a specified minimum version number
UnloadOneTool$1001Unloads a specified tool set from memory
TLMountVolume$1101Displays on SHR screen a simulated dialog box to prompt user to mount a volume
TLTextMountVol$1201Displays on 40-column text screen a simulated dialog box to prompt user to mount volume
SaveTextState$1301Saves state of text scrn & forces hardware to display text scrn regardless of current mode
RestoreTextState$1401Restores state of text screen from a specified handle and disposes of the handle
MessageCenter$1501Allows applications to communicate with each other (Tool Locator version >= 2.1)
SetDefaultTPT$1601Sets default Tool Pointer Table (TPT) to current TPT - Used to install a tool patch - not called by application
MessageByName$1701Creates and associates a name with a new message, providing a mechanism for passing messages between programs
StartUpTools$1801Starts and loads the tools specified in the input StartStop record
ShutDownTools$1901Shuts down the tools specified in the input StartStop record
GetMsgHandle$1A01Returns the handle to a message in the Message Center
AcceptRequests$1B01Call AcceptRequests to notify the system that you can receive requests
SendRequest$1C01Sends the specified request to zero or more qualifying registered request procedures (IPC)

Tool Locator Calls


$0101

TLBootInit

Initializes Tool Locator and all other ROM-based tools sets - not called by application

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C

Call must not be made by an application.

Docs

2️⃣




$0201

TLStartUp

Starts up the Tool Locator for use by an application

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void TLStartUp() 
Docs

2️⃣




$0301

TLShutDown

Shuts down the Tool Locator when an application quits

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void TLShutDown() 
Docs

2️⃣ 3️⃣




$0401

TLVersion

Returns the version number of the Tool Locator

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
versionInfoWord — Version number of Tool Locator
SP
Errors

None

C
extern pascal Word TLVersion() 
Docs

2️⃣




$0501

TLReset

Resets the Tool Locator & all other ROM-based tool sets on system reset - not by appl.

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C

Call must not be made by an application.

Docs

2️⃣




$0601

TLStatus

Indicates whether Tool Locator is active

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
activeFlagWord — BOOLEAN; TRUE (Tool Locator is always active)
SP
Errors

None

C
extern pascal Boolean TLStatus() 
Docs

2️⃣




$0901

GetTSPtr

Returns the pointer to the function pointer table of a specified tool set

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
userOrSystemWord — $0000 = system tool set; $8000 = user tool set
tsNumWord — Tool set number of tool set whose pointer is to be returned
SP
Stack after call
previous contents
fptPtr Long — POINTER to function table pointer of tool set
 
SP
Errors
$0001    toolNotFoundErr         Specified tool set not found
C
extern pascal Pointer GetTSPtr(userOrSystem,tsNum) 
Docs

2️⃣




$0A01

SetTSPtr

Installs the pointer to a function ptr table in the appropriate tool pointer table

Parameters
Stack before call
previous contents
userOrSystemWord — $0000 = system tool set; $8000 = user tool set
tsNumWord — Tool set number of tool set
fptPtr Long — POINTER to function table pointer of tool set
 
SP
Stack after call
previous contents
SP
Errors
$0001    toolNotFoundErr         Specified tool set not found
C
extern pascal void SetTSPtr(userOrSystem,tsNum, fptPtr) 
Docs

2️⃣




$0B01

GetFuncPtr

Returns entry in the function ptr table for a specified function in a specified tool set

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
userOrSystemWord — $0000 = system tool set; $8000 = user tool set
funcNum | tsNumByte — Funtion number   | Byte — Tool set number
SP
Stack after call
previous contents
fptEntry Long — Entry in function pointer table
 
SP
Errors
$0001    toolNotFoundErr         Specified tool set not found
$0002    funcNotFoundErr         Specified routine not found
C
extern pascal Pointer GetFuncPtr(userOrSystem,funcTsNum) 
Docs

2️⃣




$0C01

GetWAP

Gets the pointer to the work area for a specified tool set

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
userOrSystemWord — $0000 = system tool set; $8000 = user tool set
tsNumWord — Tool set number
SP
Stack after call
previous contents
waptPtr Long — POINTER to work area of tool set
 
SP
Errors
$0001    toolNotFoundErr         Specified tool set not found
C
extern pascal Pointer GetWAP(userOrSystem,tsNum) 
Docs

2️⃣




$0D01

SetWAP

Sets the pointer to the work area for a specified tool set

Parameters
Stack before call
previous contents
userOrSystemWord — $0000 = system tool set; $8000 = user tool set
tsNumWord — Tool set number
waptPtr Long — POINTER to work area of tool set
 
SP
Stack after call
previous contents
SP
Errors
$0001    toolNotFoundErr         Specified tool set not found
C
extern pascal void SetWAP(userOrSystem,tsNum,waptPtr) 
Docs

2️⃣




$0E01

LoadTools

Ensures that specified system tool sets are available & have specified minimum version numbers

Parameters
Stack before call
previous contents
toolTablePtr Long — POINTER to table of tool set numbers
 
SP
Stack after call
previous contents
SP
Errors
$0001    toolNotFoundErr         Specified tool set not found
$0010    toolVersionErr          Specified minimum version not found
System Loader errors             Returned unchanged
ProDOS 16 errors                 Returned unchanged
C
extern pascal void LoadTools(toolTablePtr) 
Docs

2️⃣ 📕 🗒️




$0F01

LoadOneTool

Ensures that specified system tool set is available & has a specified minimum version number

Parameters
Stack before call
previous contents
toolNumberWord — INTEGER; tool set number of tool set to load
minVersionWord — Minimum version number of tool set needed
SP
Stack after call
previous contents
SP
Errors
$0001    toolNotFoundErr         Specified tool set not found
$0010    toolVersionErr          Specified minimum version not found
System Loader errors             Returned unchanged
ProDOS 16 errors                 Returned unchanged
C
extern pascal void LoadOneTool(toolNumber,minVersion) 
Docs

2️⃣ 📕 🗒️




$1001

UnloadOneTool

Unloads a specified tool set from memory

Parameters
Stack before call
previous contents
toolNumberWord — INTEGER; tool set number of tool set to load
SP
Stack after call
previous contents
SP
Errors
$0001    toolNotFoundErr         Specified tool set not found
C
extern pascal void UnloadOneTool(toolNumber) 
Docs

2️⃣ 📕




$1101

TLMountVolume

Displays on SHR screen a simulated dialog box to prompt user to mount a volume

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
whereXWord — INTEGER; upper lext X coordinate for box
whereYWord — INTEGER; upper lext Y coordinate for box
line1Ptr Long — POINTER to Pascal-type string to appear at top of box
 
line2Ptr Long — POINTER to Pascal-type string to appear just below line 1
 
but1Ptr Long — POINTER to Pascal-type string to appear inside button 1
 
but2Ptr Long — POINTER to Pascal-type string to appear inside button 2
 
SP
Stack after call
previous contents
whichButtonWord — Button number chosen; Return = 1, Esc = 2
SP
Errors

None

C
extern pascal Word TLMountVolume(whereX,whereY,line1Ptr,line2Ptr,but1Ptr,but2Ptr) 
Docs

2️⃣ 📕




$1201

TLTextMountVol

Displays on 40-column text screen a simulated dialog box to prompt user to mount volume

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
line1Ptr Long — POINTER to Pascal-type string to appear at top of box
 
line2Ptr Long — POINTER to Pascal-type string to appear just below line 1
 
but1Ptr Long — POINTER to Pascal-type string to appear inside button 1
 
but2Ptr Long — POINTER to Pascal-type string to appear inside button 2
 
SP
Stack after call
previous contents
whichButtonWord — Button number chosen; Return = 1, Esc = 2
SP
Errors

None

C
extern pascal Word TLTextMountVolume(line1Ptr,line2Ptr,but1Ptr,but2Ptr) 
Docs

2️⃣




$1301

SaveTextState

Saves state of text scrn & forces hardware to display text scrn regardless of current mode

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
stateHandle Long — HANDLE to state record (see Toolbox Ref Vol2, Table 24-4)
 
SP
Errors

None

C
extern pascal Handle SaveTextState() 
Docs

2️⃣ 3️⃣ 📕




$1401

RestoreTextState

Restores state of text screen from a specified handle and disposes of the handle

Parameters
Stack before call
previous contents
stateHandle Long — HANDLE to state record to restore
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void RestoreTextState(stateHandle) 
Docs

2️⃣ 📕




$1501

MessageCenter

Allows applications to communicate with each other (Tool Locator version >= 2.1)

Parameters
Stack before call
previous contents
actionWord — 1 = add, 2 = get, 3 = delete (see Toolbox Ref Vol2, Table 24-3)
typeWord — Message ID number
messageHandle Long — HANDLE to message
 
SP
Stack after call
previous contents
SP
Errors
$0111    messNotFoundErr         Specified message not found
C
extern pascal void MessageCenter(action,type,messageHandle) 
Docs

2️⃣ 3️⃣ 📕




$1601

SetDefaultTPT

Sets default Tool Pointer Table (TPT) to current TPT - Used to install a tool patch - not called by application

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void SetDefaultTPT() 
Docs

3️⃣




$1701

MessageByName

Creates and associates a name with a new message, providing a mechanism for passing messages between programs

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
createItFlagWord — BOOLEAN; indicates whether or not to create the message
recordPointer Long — POINTER to input record
 
SP
Stack after call
previous contents
responseRecord Long — Response record from call
 
SP
Errors
$0111    messNotFoundErr         Specified message not found
$0112    messageOvfl             No message numbers available
$0113    srqNameTooLong          Message name too long; it must be <= 62 characters.
Memory Manager errors            Returned unchanged
C
extern pascal responseRecord MessageByName(createItFlag,recordPointer) 
Docs

3️⃣




$1801

StartUpTools

Starts and loads the tools specified in the input StartStop record

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
userIDWord — Application user ID for system calls
startStopRefDescWord — Type of reference stored in startStopRef
startStopRef Long — Reference to the StartStop record
 
SP
Stack after call
previous contents
startStopRefRet Long — Reference to resulting StartStop record
 
SP
Errors
$0103    tlBadRecFlag            StartStop record invalid
$0104    tlCantLoad              A tool can't be loaded - check StartStop input record for valid tool numbers and versions and numTools value
System Loader errors             Returned unchanged
Memory Manager errors            Returned unchanged
GS/OS errors                     Returned unchanged
C
extern pascal long StartUpTools(userID,startStopRefDesc,startStopRef) 
Docs

3️⃣ 📕




$1901

ShutDownTools

Shuts down the tools specified in the input StartStop record

Parameters
Stack before call
previous contents
startStopRefDescWord — Type of reference stored in startStopRef
startStopRef Long — Reference to the StartStop record
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void ShutDownTools(startStopRefDesc,startStopRef) 
Docs

3️⃣ 📕




$1A01

GetMsgHandle

Returns the handle to a message in the Message Center

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
flagsWord — Command flags
messageRef Long — Specifies which message to fetch
 
SP
Stack after call
previous contents
theHandle Long — Handle of the specified message
 
SP
Errors
$0111    messNotFoundErr         Specified message not found
C
extern pascal Handle GetMsgHandle(flags,messageRef) 
Docs

📕




$1B01

AcceptRequests

Call AcceptRequests to notify the system that you can receive requests

Parameters
Stack before call
previous contents
nameString Long — Pointer to Pascal name string
 
userIDWord — User ID associated with this request procedure
requestProc Long — Address of the request procedure to install
 
SP
Stack after call
previous contents
SP
Errors
$0113    srqNameTooLong          Message name too long; it must be <= 62 characters.
$0121    srqDuplicateName        The name has already been used
C
extern pascal void AcceptRequests(nameString,userID,requestProc) 
Docs

📕




$1C01

SendRequest

Sends the specified request to zero or more qualifying registered request procedures (IPC)

Parameters
Stack before call
previous contents
reqCodeWord — Request code
sendHowWord — Specifies how to send the request
target Long — Specifies recipient of request
 
dataIn Long — Input data or pointer to input data
 
dataOut Long — POINTER to output buffer
 
SP
Stack after call
previous contents
SP
Errors
$0120    reqNotAccepted          Nobody accepted the request
$0122    invalidSendRequest      Bad combination of reqCode and target
C
extern pascal void SendRequest(reqCode,sendHow,target,dataIn,dataOut) 
Docs

📕








Memory Manager




Memory Manager Calls
Routine#Description
MMBootInit$0102Called ONLY by the Tool Locator when Memory Manager is initialized - not called by application
MMStartUp$0202Starts up the Memory Manager for use by an application
MMShutDown$0302Shuts down the Memory Manager when the application quits
MMVersion$0402Returns the version number of the Memory Manager
MMReset$0502Called ONLY when the system is Reset - not called by application
MMStatus$0602Indicates whether or not the Memory Manager is active
NewHandle$0902Creates a new block and returns the handle to the block
ReAllocHandle$0A02Reallocates a purged block, using new attributes
RestoreHandle$0B02Reallocates purged blk with same attrib, user ID, & size as the purged handle
AddToOOMQueue$0C02Adds the specified out-of-memory routine to the head of the out-of-memory queue
RemoveFromOOMQ$0D02Removes the specified out-of-memory routine from the queue
DisposeHandle$1002Discards a specified block and deallocates its handle. The block is purged regardless of locked status and purge level.
DisposeAll$1102Discards all of the handles and blocks belonging to a specifed user ID
PurgeHandle$1202Purges a specified purgeable, unlocked block, but doesn't deallocate handle
PurgeAll$1302Purges all of the purgeable, unlocked blocks for a specified user ID
GetHandleSize$1802Returns the size of a block
SetHandleSize$1902Changes the size of a specified block
FindHandle$1A02Returns the handle of a block containing a specified address. If the block is not locked, it may later move.
FreeMem$1B02Returns the total number of free bytes in memory
MaxBlock$1C02Returns size of largest free mem block, but not mem that can be freed by purge or compact
TotalMem$1D02Returns the size of all memory, including the main 256k
CheckHandle$1E02Checks a specified handle to see whether it is valid
CompactMem$1F02Compacts memory space
HLock$2002Locks a block, specified by handle
HLockAll$2102Locks all of the blocks belonging to a specified user ID
HUnlock$2202Unlocks a specified block
HUnlockAll$2302Unlocks all of the blocks belonging to a specified user ID
SetPurge$2402Sets the purge level of a specified block. 0=Not, 1=Least, 2=Next Most, 3=Most (3 is only for System Loader, use levels 0-2)
SetPurgeAll$2502Sets the purge level of all blocks belonging to a specified user ID
PtrToHand$2802Copies spec. # of bytes from src to dest., w/src spec. by pointer, & dest. spec. by handle
HandToPtr$2902Copies spec. # of bytes from src to dest., w/src spec. by handle, & dest. spec. by pointer
HandToHand$2A02Copies spec. # of bytes from src to dest., w/src spec. by handle, & dest. spec. by handle
BlockMove$2B02Copies a specified number of bytes from a source to a destination
RealFreeMem$2F02Returns number of free bytes in memory, plus number that could be made free by purging
SetHandleID$3002Provides a supported way to determine and optionally change the User ID associated with a Memory Manager handle

Memory Manager Calls


$0102

MMBootInit

Called ONLY by the Tool Locator when Memory Manager is initialized - not called by application

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C

Call must not be made by an application.

Docs

1️⃣




$0202

MMStartUp

Starts up the Memory Manager for use by an application

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
userIDWord — User ID assigned to the application by the operating system
SP
Errors
$0207    idErr                   Invalid user ID
C
extern pascal Word MMStartUp() 
Docs

1️⃣




$0302

MMShutDown

Shuts down the Memory Manager when the application quits

Parameters
Stack before call
previous contents
userIDWord — User ID of the application to be shut down
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void MMShutDown(userID) 
Docs

1️⃣




$0402

MMVersion

Returns the version number of the Memory Manager

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
versionInfoWord — Version number of the Memory Manager
SP
Errors

None

C
extern pascal Word MMVersion() 
Docs

1️⃣




$0502

MMReset

Called ONLY when the system is Reset - not called by application

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors
$0201    memErr                  Unable to allocate memory
C

Call must not be made by an application.

Docs

1️⃣




$0602

MMStatus

Indicates whether or not the Memory Manager is active

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
activeFlagWord — BOOLEAN; TRUE if Memory Manager is active, FALSE if inactive
SP
Errors

None

C
extern pascal Boolean MMStatus() 
Docs

1️⃣




$0902

NewHandle

Creates a new block and returns the handle to the block

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
blockSize Long — Size in bytes of block to create
 
userIDWord — User ID to be associated with the block
attributesWord — Attributes (see Toolbox Ref Vol1 Figure 12-9)
locationPtr Long — POINTER to where in memory the block is to begin
 
SP
Stack after call
previous contents
theHandle Long — HANDLE of new block; empty if block of 0 bytes created
 
SP
Errors
$0201    memErr                  Unable to allocate memory
$0204    lockErr                 Illegal operation on a locked or immovable block
$0207    idErr                   Invalid user ID
C
extern pascal Handle NewHandle(blockSize,userID,attributes,locationPtr) 
Docs

1️⃣




$0A02

ReAllocHandle

Reallocates a purged block, using new attributes

Parameters
Stack before call
previous contents
blockSize Long — Size in bytes of block to create
 
userIDWord — User ID to be associated with the block
attributesWord — Attributes (see Toolbox Ref Vol1 Figure 12-9)
locationPtr Long — POINTER to where in memory the block is to begin
 
theHandle Long — HANDLE of the block to reallocate
 
SP
Stack after call
previous contents
SP
Errors
$0201    memErr                  Unable to allocate memory
$0203    notEmptyErr             Illegal operation on a handle that is not empty
$0204    lockErr                 Illegal operation on a locked or immovable block
$0206    handleErr               Invalid handle
$0207    idErr                   Invalid user ID
C
extern pascal void ReallocHandle(blockSize,userID,attributes,locationPtr,theHandle) 
Docs

1️⃣




$0B02

RestoreHandle

Reallocates purged blk with same attrib, user ID, & size as the purged handle

Parameters
Stack before call
previous contents
theHandle Long — HANDLE of the block to restore
 
SP
Stack after call
previous contents
SP
Errors
$0201    memErr                  Unable to allocate memory
$0203    notEmptyErr             Illegal operation on a handle that is not empty
$0206    handleErr               Invalid handle
$0208    attrErr                 Illegal operation for the specified attributes
C
extern pascal void RestoreHandle(theHandle) 
Docs

1️⃣




$0C02

AddToOOMQueue

Adds the specified out-of-memory routine to the head of the out-of-memory queue

Parameters
Stack before call
previous contents
headerPtr Long — POINTER to out-of-memory routine
 
SP
Stack after call
previous contents
SP
Errors
$0381    invalidTag              The correct signature value was not found in the header
C
extern pascal void AddToOOMQueue(headerPtr) 
Docs

3️⃣




$0D02

RemoveFromOOMQ

Removes the specified out-of-memory routine from the queue

Parameters
Stack before call
previous contents
headerPtr Long — POINTER to out-of-memory routine
 
SP
Stack after call
previous contents
SP
Errors
$0380    notInList               Specified routine not found in queue
$0381    invalidTag              The correct signature value was not found in the header
C
extern pascal void RemoveFromOOMQueue(headerPtr) 
Docs

3️⃣




$1002

DisposeHandle

Discards a specified block and deallocates its handle. The block is purged regardless of locked status and purge level.

Parameters
Stack before call
previous contents
theHandle Long — HANDLE of the block to be discarded
 
SP
Stack after call
previous contents
SP
Errors
$0206    handleErr               Invalid handle
C
extern pascal void DisposeHandle(theHandle) 
Docs

1️⃣




$1102

DisposeAll

Discards all of the handles and blocks belonging to a specifed user ID

Parameters
Stack before call
previous contents
userIDWord — User ID whose handles will be discarded
SP
Stack after call
previous contents
SP
Errors
$0207    idErr                   Invalid user ID
C
extern pascal void DisposeAll(userID) 
Docs

1️⃣




$1202

PurgeHandle

Purges a specified purgeable, unlocked block, but doesn't deallocate handle

Parameters
Stack before call
previous contents
theHandle Long — HANDLE of the block to be purged
 
SP
Stack after call
previous contents
SP
Errors
$0204    lockErr                 Illegal operation on a locked or immovable block
$0205    purgeErr                Attempt to purge an unpurgeable block
$0206    handleErr               Invalid handle
C
extern pascal void PurgeHandle(theHandle) 
Docs

1️⃣




$1302

PurgeAll

Purges all of the purgeable, unlocked blocks for a specified user ID

Parameters
Stack before call
previous contents
userIDWord — User ID whose blocks will be purged
SP
Stack after call
previous contents
SP
Errors
$0202    emptyErr                Illegal operation on an empty handle
$0206    handleErr               Invalid handle
$0207    idErr                   Invalid user ID
C
extern pascal void PurgeAll(userID) 
Docs

1️⃣




$1802

GetHandleSize

Returns the size of a block

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
theHandle Long — HANDLE of block whose size is to be retrieved
 
SP
Stack after call
previous contents
blockSize Long — Size of block, in bytes
 
SP
Errors
$0206    handleErr               Invalid handle
C
extern pascal LongWord GetHandleSize(theHandle) 
Docs

1️⃣




$1902

SetHandleSize

Changes the size of a specified block

Parameters
Stack before call
previous contents
newSize Long — New size of blocks in bytes
 
theHandle Long — HANDLE of the block whose size is to be set
 
SP
Stack after call
previous contents
SP
Errors
$0201    memErr                  Unable to allocate memory
$0202    emptyErr                Illegal operation on an empty handle
$0204    lockErr                 Illegal operation on a locked or immovable block
$0206    handleErr               Invalid handle
C
extern pascal void SetHandleSize(newSize,theHandle) 
Docs

1️⃣ 3️⃣




$1A02

FindHandle

Returns the handle of a block containing a specified address. If the block is not locked, it may later move.

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
locationPtr Long — POINTER whose handle will be found
 
SP
Stack after call
previous contents
theHandle Long — HANDLE of locationPtr; NIL if not found
 
SP
Errors

None

C
extern pascal Handle FindHandle(locationPtr) 
Docs

1️⃣




$1B02

FreeMem

Returns the total number of free bytes in memory

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
freeSize Long — Total number of free bytes in memory
 
SP
Errors

None

C
extern pascal LongWord FreeMem() 
Docs

1️⃣




$1C02

MaxBlock

Returns size of largest free mem block, but not mem that can be freed by purge or compact

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
blockSize Long — Size in bytes of largest free block in memory
 
SP
Errors

None

C
extern pascal LongWord MaxBlock() 
Docs

1️⃣




$1D02

TotalMem

Returns the size of all memory, including the main 256k

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
totalSize Long — Total size in bytes of memory, including main 256K
 
SP
Errors

None

C
extern pascal LongWord TotalMem() 
Docs

1️⃣




$1E02

CheckHandle

Checks a specified handle to see whether it is valid

Parameters
Stack before call
previous contents
theHandle Long — HANDLE whose validity will be checked
 
SP
Stack after call
previous contents
SP
Errors
$0206    handleErr               Invalid handle
C
extern pascal void CheckHandle(theHandle) 
Docs

1️⃣




$1F02

CompactMem

Compacts memory space

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void CompactMem() 
Docs

1️⃣




$2002

HLock

Locks a block, specified by handle

Parameters
Stack before call
previous contents
theHandle Long — HANDLE of the block to be locked
 
SP
Stack after call
previous contents
SP
Errors
$0206    handleErr               Invalid handle
C
extern pascal void HLock(theHandle) 
Docs

1️⃣




$2102

HLockAll

Locks all of the blocks belonging to a specified user ID

Parameters
Stack before call
previous contents
userIDWord — User ID whose blocks will be locked
SP
Stack after call
previous contents
SP
Errors
$0207    idErr                   Invalid user ID
C
extern pascal void HLockAll(userID) 
Docs

1️⃣




$2202

HUnlock

Unlocks a specified block

Parameters
Stack before call
previous contents
theHandle Long — HANDLE of the block to be locked
 
SP
Stack after call
previous contents
SP
Errors
$0206    handleErr               Invalid handle
C
extern pascal void HUnlock(theHandle) 
Docs

1️⃣




$2302

HUnlockAll

Unlocks all of the blocks belonging to a specified user ID

Parameters
Stack before call
previous contents
userIDWord — User ID whose blocks will be unlocked
SP
Stack after call
previous contents
SP
Errors
$0207    idErr                   Invalid user ID
C
extern pascal void HUnlockAll(userID) 
Docs

1️⃣




$2402

SetPurge

Sets the purge level of a specified block. 0=Not, 1=Least, 2=Next Most, 3=Most (3 is only for System Loader, use levels 0-2)

Parameters
Stack before call
previous contents
newPurgeLevelWord — New purge level of block (bits 1-0 only; set others to 0)
theHandle Long — HANDLE of the block whose purge level is to be set
 
SP
Stack after call
previous contents
SP
Errors
$0206    handleErr               Invalid handle
C
extern pascal void SetPurge(newPurgeLevel,theHandle) 
Docs

1️⃣




$2502

SetPurgeAll

Sets the purge level of all blocks belonging to a specified user ID

Parameters
Stack before call
previous contents
newPurgeLevelWord — New purge level of block (bits 1-0 only; set others to 0)
userIDWord — User ID whose blocks are to be set to newPurgeLevel
SP
Stack after call
previous contents
SP
Errors
$0207    idErr                   Invalid user ID
C
extern pascal void SetPurgeAll(newPurgeLevel,userID) 
Docs

1️⃣




$2802

PtrToHand

Copies spec. # of bytes from src to dest., w/src spec. by pointer, & dest. spec. by handle

Parameters
Stack before call
previous contents
sourcePtr Long — POINTER specifying start of bytes to be copied
 
destHandle Long — HANDLE specifying starting adress where bytes will be written
 
count Long — Number of bytes to be copied
 
SP
Stack after call
previous contents
SP
Errors
$0202    emptyErr                Illegal operation on an empty handle
$0206    handleErr               Invalid handle
C
extern pascal void PtrToHand(sourcePtr,destHandle,count) 
Docs

1️⃣




$2902

HandToPtr

Copies spec. # of bytes from src to dest., w/src spec. by handle, & dest. spec. by pointer

Parameters
Stack before call
previous contents
sourceHandle Long — HANDLE specifying start of bytes to be copied
 
destPtr Long — POINTER to starting adress where bytes will be written
 
count Long — Number of bytes to be copied
 
SP
Stack after call
previous contents
SP
Errors
$0202    emptyErr                Illegal operation on an empty handle
$0206    handleErr               Invalid handle
C
extern pascal void HandToPtr(sourceHandle,destPtr,count) 
Docs

1️⃣




$2A02

HandToHand

Copies spec. # of bytes from src to dest., w/src spec. by handle, & dest. spec. by handle

Parameters
Stack before call
previous contents
sourceHandle Long — HANDLE specifying start of bytes to be copied
 
destHandle Long — HANDLE specifying starting adress where bytes will be written
 
count Long — Number of bytes to be copied
 
SP
Stack after call
previous contents
SP
Errors
$0202    emptyErr                Illegal operation on an empty handle
$0206    handleErr               Invalid handle
C
extern pascal void HandToHand(sourceHandle,destHandle,count) 
Docs

1️⃣




$2B02

BlockMove

Copies a specified number of bytes from a source to a destination

Parameters
Stack before call
previous contents
sourcePtr Long — POINTER to start of bytes to be copied
 
destPtr Long — POINTER to starting adress where bytes will be written
 
count Long — Number of bytes to be copied
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void BlockMove(sourcePtr,destPtr,count) 
Docs

1️⃣




$2F02

RealFreeMem

Returns number of free bytes in memory, plus number that could be made free by purging

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
freeBytes Long — Number of bytes available in memory
 
SP
Errors

None

C
extern pascal Long RealFreeMem() 
Docs

3️⃣




$3002

SetHandleID

Provides a supported way to determine and optionally change the User ID associated with a Memory Manager handle

Parameters
Stack before call
previous contents
wordspaceWord — Space for old ID
newIDWord — New ID for handle (0 to leave it unchanged)
theHandle Long — Handle to be updated
 
SP
Stack after call
previous contents
oldIDWord — Handle's previous ID
SP
Errors

None

C
extern pascal word SetHandleID(newID,theHandle) 
Docs

📕








Misc Tools




Misc Tools Calls
Routine#Description
MTBootInit$0103Initializes the Miscellaneous Tools Set; called only by Tool Locator
MTStartUp$0203Starts up the Miscellaneous Tool Set for use by an application
MTShutDown$0303Shuts down the Miscellaneous Tool Set when an application quits
MTVersion$0403Returns the version number of the Miscellaneous Tool Set
MTReset$0503Resets the Miscellaneous Tool Set; called only when the system is reset
MTStatus$0603Indicates whether the Miscellaneous Tools Set is active
WriteBRam$0903Writes 252 bytes of data from a specified mem loc, plus 4 checksum bytes, to Battery RAM
ReadBRam$0A03Reads 252 bytes of data from Battery RAM, plus 4 checksum bytes, & writes to specified mem loc
WriteBParam$0B03Writes data to a specified paramameter in Battery RAM
ReadBParam$0C03Reads data from a specified parameter in Battery RAM
ReadTimeHex$0D03Returns current time in hexadecimal format
WriteTimeHex$0E03Sets the current time in hexadecimal format
ReadAsciiTime$0F03Reads elapsed time since 00:00:00, Jan 1, 1904, converts it to ASCII output at specified address
SetVector$1003Sets the vector address for a specified interrupt manager or handler
GetVector$1103Returns the vector address for a specified interrupt manager or handler
SetHeartBeat$1203Installs a specified task into the HeartBeat Interrupt Task queue
DelHeartBeat$1303Deletes a specified task from the HeartBeat Interrupt Task queue
ClrHeartBeat$1403Removes all tasks from the Heartbeat Interrupt Task queue by clearing Heartbeat Task pointer
SysFailMgr$1503Displays system failure message and halts program execution
GetAddr$1603Returns an address of a byte, word, or long parameter referenced by the firmware
ReadMouse$1703Returns mouse position, status, and mode
InitMouse$1803Initializes mouse clamp values to $000 min & $3FF max & clears mouse mode & status
SetMouse$1903Sets the mouse mode
HomeMouse$1A03Positions the mouse at the minimum clamp position
ClearMouse$1B03Sets X & Y axis to $0000 if min clamps are negative or to the min clamp pos if positive
ClampMouse$1C03Sets new clamp values & then sets the mouse position to the minimum clamp values
GetMouseClamp$1D03Returns the current mouse clamp values
PosMouse$1E03Positions the mouse at specified coordinates
ServeMouse$1F03Returns the mouse interrupt status
GetNewID$2003Creates a new user ID
DeleteID$2103Deletes all references to a specified user ID
StatusID$2203Indicates whether a specified user ID is active
IntSource$2303Enables or disables certain interrupt sources
FWentry$2403Allows some Apple II emulation-mode entry points to be supported from full native mode
GetTick$2503Returns the current value of the tick counter
PackBytes$2603Packs bytes into a special format that uses less storage space
UnPackBytes$2703Umpacks data from the packed format used by PackBytes
Munger$2803Manipulates bytes in a string of bytes (like find and replace)
GetIRQEnable$2903Returns w/hardware interrupt enable states for interrupt sources that Misc.Tool can control
SetAbsClamp$2A03Sets the clamp values for an absolute device to new values
GetAbsClamp$2B03Returns the current values of the absolute device clamps
SysBeep$2C03Calls the Apple II monitor entry point BELL1
BasicInit$2D03Unofficial call to set up the clamp flags when calling from BASICMOUSE
AddToQueue$2E03Adds the specified entry to a queue
DeleteFromQueue$2F03Deletes a specified element from a queue
SetInterruptState$3003Copies the specified number of bytes from the input interrupt state record into the system interrupt variables
GetInterruptState$3103Copies the specified number of bytes into an input interrupt record from the system interrupt variables
GetIntStateRecSize$3203Returns the size (in bytes) of the interrupt state record
ReadMouse2$3303Returns the mouse position, status, and mode
GetCodeResConverter$3403Returns the address of a routine that loads code resources
GetROMResource$3503This call is for use only by system firmware
ReleaseROMResource$3603This call is for use only by system firmware
ConvSeconds$3703Allows conversion to and from a long integer containing the number of seconds since January 1, 1904
SysBeep2$3803SysBeep2 takes an integer parameter indicating what sound to make
VersionString$3903Converts a 32-bit Version number into a Pascal string
WaitUntil$3A03Provides an upper limit on the frequency of repeating actions
StringToText$3B03StringToText translates 8-bit-character text into similar text that can be displayed on the Apple IIGS text screen
ShowBootInfo$3C03Provides a way for special system extensions to make their presence known while the system is starting up
ScanDevices$3D03Provides easy access to a GS/OS system service vector which checks for disk insertions
AlertMessage$3E03Displays a message on either the text screen or the Super Hi-Res screen and makes the user choose 1 of up to 3 buttons
DoSysPrefs$3F03Clears and then sets specified bits in the GS/OS system preferences word

Misc Tools Calls


$0103

MTBootInit

Initializes the Miscellaneous Tools Set; called only by Tool Locator

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C

Call must not be made by an application.

Docs

1️⃣




$0203

MTStartUp

Starts up the Miscellaneous Tool Set for use by an application

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void MTStartUp() 
Docs

1️⃣




$0303

MTShutDown

Shuts down the Miscellaneous Tool Set when an application quits

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void MTShutDown() 
Docs

1️⃣




$0403

MTVersion

Returns the version number of the Miscellaneous Tool Set

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
versionInfoWord — Version number of the Miscellaneous Tool Set
SP
Errors

None

C
extern pascal Word MTVersion() 
Docs

1️⃣




$0503

MTReset

Resets the Miscellaneous Tool Set; called only when the system is reset

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C

Call must not be made by an application.

Docs

1️⃣




$0603

MTStatus

Indicates whether the Miscellaneous Tools Set is active

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
activeFlagWord — BOOLEAN; TRUE if Miscellaneous Tool Set is active, FALSE if not
SP
Errors

None

C
extern pascal Boolean MTStatus() 
Docs

1️⃣




$0903

WriteBRam

Writes 252 bytes of data from a specified mem loc, plus 4 checksum bytes, to Battery RAM

Parameters
Stack before call
previous contents
bufferPtr Long — POINTER to the 252 bytes to be written to Battery RAM
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void WriteBRam(bufferPtr) 
Docs

1️⃣




$0A03

ReadBRam

Reads 252 bytes of data from Battery RAM, plus 4 checksum bytes, & writes to specified mem loc

Parameters
Stack before call
previous contents
bufferPtr Long — POINTER to the 256 bytes to be written to application
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void ReadBRam(bufferPtr) 
Docs

1️⃣




$0B03

WriteBParam

Writes data to a specified paramameter in Battery RAM

Parameters
Stack before call
previous contents
theDataWord — Data to be written (low-order byte only)on
paramRefNumWord — Parameter reference number (see Toolbox Ref Vol1, Table 14-3)
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void WriteBParam(theData,paramRefNum) 
Docs

1️⃣




$0C03

ReadBParam

Reads data from a specified parameter in Battery RAM

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
paramRefNumWord — Parameter reference number (see Toolbox Ref Vol1, Table 14-3)
SP
Stack after call
previous contents
theDataWord — Data that was read (low-order byte only)
SP
Errors

None

C
extern pascal word ReadBParam(paramRefNum) 
Docs

1️⃣




$0D03

ReadTimeHex

Returns current time in hexadecimal format

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
wordspaceWord — Space for result
wordspaceWord — Space for result
wordspaceWord — Space for result
SP
Stack after call
previous contents
weekDay | nullByte — Day of week (1-7, with 1=Sunday...)   | Byte — Padding the word
month | dayByte — Month (0-11, with 1=January...)   | Byte — Date (0-30)
curYear | hourByte — Current year minus 1900   | Byte — Hour (0-23)
minute | secondByte — Minute (0-59)   | Byte — Second (0-59)
SP
Errors

None

C
extern pascal TimeRec ReadTimeHex() 
Docs

1️⃣




$0E03

WriteTimeHex

Sets the current time in hexadecimal format

Parameters
Stack before call
previous contents
month | dayByte — Month (0-11, with 1=January...)   | Byte — Date (0-30)
curYear | hourByte — Current year minus 1900   | Byte — Hour (0-23)
minute | secondByte — Minute (0-59)   | Byte — Second (0-59)
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void WriteTimeHex(month,day,curYear,hour,minute,second) 
Docs

1️⃣




$0F03

ReadAsciiTime

Reads elapsed time since 00:00:00, Jan 1, 1904, converts it to ASCII output at specified address

Parameters
Stack before call
previous contents
bufferPtr Long — POINTER to start of buffer
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void ReadAsciiTime(bufferPtr) 
Docs

1️⃣




$1003

SetVector

Sets the vector address for a specified interrupt manager or handler

Parameters
Stack before call
previous contents
vectorRefNumWord — Vector to be set (see Toolbox Ref Vol1 Figure 14-9)
vectorPtr Long — POINTER to the manager or handle
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetVector(vectorRefNum,vectorAddrPtr) 
Docs

1️⃣ 3️⃣




$1103

GetVector

Returns the vector address for a specified interrupt manager or handler

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
vectorRefNumWord — Vector reference number of manager or handler
SP
Stack after call
previous contents
vectorPtr Long — POINTER to the manager or handle
 
SP
Errors

None

C
extern pascal Pointer GetVector(vectorRefNum) 
Docs

1️⃣ 3️⃣




$1203

SetHeartBeat

Installs a specified task into the HeartBeat Interrupt Task queue

Parameters
Stack before call
previous contents
taskPtr Long — POINTER to task header
 
SP
Stack after call
previous contents
SP
Errors
$0303    taskInstlErr            Specified task already in heartbeat queue
$0304    noSigTaskErr            No signature detected in the task header
$0305    queueDmgdErr            Damaged Heartbeat queue detected
C
extern pascal void SetHeartBeat(taskPtr) 
Docs

1️⃣




$1303

DelHeartBeat

Deletes a specified task from the HeartBeat Interrupt Task queue

Parameters
Stack before call
previous contents
taskPtr Long — POINTER to task header
 
SP
Stack after call
previous contents
SP
Errors
$0305    queueDmgdErr            Damaged Heartbeat queue detected
$0306    queueDmgdErr            Specified task not in queue
C
extern pascal void DelHeartBeat(taskPtr) 
Docs

1️⃣ 3️⃣




$1403

ClrHeartBeat

Removes all tasks from the Heartbeat Interrupt Task queue by clearing Heartbeat Task pointer

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void ClrHeartBeat() 
Docs

1️⃣ 3️⃣ 3️⃣




$1503

SysFailMgr

Displays system failure message and halts program execution

Parameters
Stack before call
previous contents
errorCodeWord — Error code (see Toolbox Ref Vol1 Figure 14-8)
strPtr Long — POINTER to ASCII string to be displayed as system failure message
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SysFailMgr(errorCode,strPtr) 
Docs

1️⃣




$1603

GetAddr

Returns an address of a byte, word, or long parameter referenced by the firmware

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
refNumWord — Parameter reference number (see Toolbox Ref Vol1, Table 14-5)
SP
Stack after call
previous contents
paramPtr Long — POINTER to parameter
 
SP
Errors
$0301    badInputErr             Bad input parameter
C
extern pascal Pointer GetAddr(refNum) 
Docs

1️⃣




$1703

ReadMouse

Returns mouse position, status, and mode

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
wordspaceWord — Space for result
wordspaceWord — Space for result
SP
Stack after call
previous contents
xPositionWord — X position of the mouse
yPositionWord — Y position of the mouse
status | modeByte — Mouse status   | Byte — Mouse mode
SP
Errors
$0309    unCnctdDevErr           Dispatch attempted to unconnected device
C
extern pascal MouseRec ReadMouse() 
Docs

1️⃣




$1803

InitMouse

Initializes mouse clamp values to $000 min & $3FF max & clears mouse mode & status

Parameters
Stack before call
previous contents
mouseSlotWord — Requests search for mouse ($0000) or slot for mouse ($0001-7)
SP
Stack after call
previous contents
SP
Errors
$0302    noDevParamErr           device for the input parameter
C
extern pascal void InitMouse(mouseSlot) 
Docs

1️⃣




$1903

SetMouse

Sets the mouse mode

Parameters
Stack before call
previous contents
mouseModeWord — Mouse mode, low-order byte only (see Toolbox Ref V1, Table 14-7)
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetMouse(mouseMode) 
Docs

1️⃣




$1A03

HomeMouse

Positions the mouse at the minimum clamp position

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void HomeMouse() 
Docs

1️⃣




$1B03

ClearMouse

Sets X & Y axis to $0000 if min clamps are negative or to the min clamp pos if positive

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void ClearMouse() 
Docs

1️⃣




$1C03

ClampMouse

Sets new clamp values & then sets the mouse position to the minimum clamp values

Parameters
Stack before call
previous contents
xMinClampWord — Minimum clamp value for the X axis
xMaxClampWord — Maximum clamp value for the X axis
yMinClampWord — Minimum clamp value for the Y axis
yMaxClampWord — Maximum clamp value for the Y axis
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void ClampMouse(xMinClamp,xMaxClamp,yMinClamp,yMaxClamp) 
Docs

1️⃣




$1D03

GetMouseClamp

Returns the current mouse clamp values

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
wordspaceWord — Space for result
wordspaceWord — Space for result
wordspaceWord — Space for result
SP
Stack after call
previous contents
xMinClampWord — Minimum clamp value for the X axis
xMaxClampWord — Maximum clamp value for the X axis
yMinClampWord — Minimum clamp value for the Y axis
yMaxClampWord — Maximum clamp value for the Y axis
SP
Errors

None

C
extern pascal ClampRec GetMouseClamp() 
Docs

1️⃣




$1E03

PosMouse

Positions the mouse at specified coordinates

Parameters
Stack before call
previous contents
xPosWord — X axis (horizontal) position of mouse
yPosWord — Y axis (vertical) position of mouse
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void PosMouse(xPos,yPos) 
Docs

1️⃣




$1F03

ServeMouse

Returns the mouse interrupt status

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
intStatusWord — Mouse interrupt status (see Toolbox Ref Vol1 Figure 14-2)
SP
Errors

None

C
extern pascal Word ServeMouse() 
Docs

1️⃣




$2003

GetNewID

Creates a new user ID

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
idTagWord — High-order byte = type and auxID fields; low-order byte = $0000
SP
Stack after call
previous contents
userIDWord — Complete user ID
SP
Errors
$0301    badInputErr             Bad input parameter
$030B    idTagNtAvlErr           No ID tag available
C
extern pascal Word GetNewID(idTag) 
Docs

1️⃣ 3️⃣




$2103

DeleteID

Deletes all references to a specified user ID

Parameters
Stack before call
previous contents
idTagWord — The type and mainID fields of the user ID to delete
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void DeleteID(idTag) 
Docs

1️⃣




$2203

StatusID

Indicates whether a specified user ID is active

Parameters
Stack before call
previous contents
idTagWord — The type and mainID fields of the desired user ID
SP
Stack after call
previous contents
SP
Errors
$030B    idTagNtAvlErr           No ID tag available
C
extern pascal void StatusID(idTag) 
Docs

1️⃣




$2303

IntSource

Enables or disables certain interrupt sources

Parameters
Stack before call
previous contents
srcRefNumWord — Source reference number of interrupt (see Toolbox Ref Vol1 Figure 14-6)
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void IntSource(srcRefNum) 
Docs

1️⃣




$2403

FWentry

Allows some Apple II emulation-mode entry points to be supported from full native mode

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
wordspaceWord — Space for result
wordspaceWord — Space for result
wordspaceWord — Space for result
aRegValueWord — Accumulator at entry (low-order byte only)
xRegValueWord — X register at entry (low-order byte only)
yRegValueWord — Y register at entry (low-order byte only)
eModeEntryPtWord — Emulation mode entry point
SP
Stack after call
previous contents
statusWord — Processor status at exit (high-order byte only)
aRegExitWord — Accumulator at exit (low-order byte only)
xRegExitWord — X register at exit (low-order byte only)
yRegExitWord — Y register at exit (low-order byte only)
SP
Errors

None

C
extern pascal FWRec FWEntry(aRegValue,xRegValue,yRegValue,eModeEntryPt) 
Docs

1️⃣




$2503

GetTick

Returns the current value of the tick counter

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
tickCounter Long — Current value of the tick counter
 
SP
Errors

None

C
extern pascal LongWord GetTick() 
Docs

1️⃣




$2603

PackBytes

Packs bytes into a special format that uses less storage space

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
startHandle Long — POINTER to POINTER to start of area to be packed
 
sizePtr Long — POINTER to Word containing size of the area
 
bufferPtr Long — POINTER to the start of the output buffer area
 
bufferSizeWord — Size of the output buffer area
SP
Stack after call
previous contents
numPackbytesWord — Number of packed bytes generated
SP
Errors

None

C
extern pascal Word PackBytes(startHandle,sizePtr,bufferPtr,bufferSize) 
Docs

1️⃣ 3️⃣




$2703

UnPackBytes

Umpacks data from the packed format used by PackBytes

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
bufferPtr Long — POINTER to the buffer containing the packed data
 
bufferSizeWord — Size of the packed data buffer
startHandle Long — POINTER to POINTER to area where the data will be unpacked
 
sizePtr Long — POINTER to Word containing size of area for unpacked data
 
SP
Stack after call
previous contents
numUnpackbytesWord — Number of source bytes unpacked
SP
Errors

None

C
extern pascal Word UnPackBytes(bufferPtr,bufferSize,startHandle,sizePtr) 
Docs

1️⃣ 3️⃣ 📕




$2803

Munger

Manipulates bytes in a string of bytes (like find and replace)

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
destPtr Long — POINTER to the tect to be manipulated
 
destLenPtr Long — POINTER to number of bytes to manipulate
 
targPtr Long — POINTER to be searched for from destPtr
 
targLenWord — Number of bytes for targPtr
replPtr Long — POINTER to string to replace when targPtr found
 
replLenWord — Number of bytes for replPtr
padPtr Long — POINTER to character value to be added to short input
 
SP
Stack after call
previous contents
padBytesFoundWord — Number of bytes padded or truncated; 0 if target found; negative if not found
SP
Errors

None

C
extern pascal Word Munger(destPtr,destLenPtr,targPtr,targLen,replPtr,replLen,padPtr) 
Docs

1️⃣




$2903

GetIRQEnable

Returns w/hardware interrupt enable states for interrupt sources that Misc.Tool can control

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
hdIntStatusWord — Status of hardware interrupts (see Toolbox Ref Vol1 Figure 14-1)
SP
Errors

None

C
extern pascal Word GetIRQEnable() 
Docs

1️⃣




$2A03

SetAbsClamp

Sets the clamp values for an absolute device to new values

Parameters
Stack before call
previous contents
xMinClampWord — Minimum clamp value for the X axis
xMaxClampWord — Maximum clamp value for the X axis
yMinClampWord — Minimum clamp value for the Y axis
yMaxClampWord — Maximum clamp value for the Y axis
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetAbsClamp(xMinClamp,xMaxClamp,yMinClamp,yMaxClamp) 
Docs

1️⃣




$2B03

GetAbsClamp

Returns the current values of the absolute device clamps

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
wordspaceWord — Space for result
wordspaceWord — Space for result
wordspaceWord — Space for result
SP
Stack after call
previous contents
xMinClampWord — Minimum clamp value for the X axis
xMaxClampWord — Maximum clamp value for the X axis
yMinClampWord — Minimum clamp value for the Y axis
yMaxClampWord — Maximum clamp value for the Y axis
SP
Errors

None

C
extern pascal ClampRec GetAbsClamp() 
Docs

1️⃣




$2C03

SysBeep

Calls the Apple II monitor entry point BELL1

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void SysBeep() 
Docs

1️⃣




$2D03

BasicInit

Unofficial call to set up the clamp flags when calling from BASICMOUSE






$2E03

AddToQueue

Adds the specified entry to a queue

Parameters
Stack before call
previous contents
newEntryPtr Long — POINTER to element to add to queue
 
headerPtr Long — POINTER to first queue element
 
SP
Stack after call
previous contents
SP
Errors
$0381    invalidTag              The correct signature value was not found in the header
$0382    alreadyInQueue          Specified element already in queue
C
extern pascal void AddToQueue(newEntryPtr,headerPtr) 
Docs

3️⃣




$2F03

DeleteFromQueue

Deletes a specified element from a queue

Parameters
Stack before call
previous contents
entryPtr Long — POINTER to element to delete from queue
 
headerPtr Long — POINTER to first queue element
 
SP
Stack after call
previous contents
SP
Errors
$0380    notInList               Specified routine not found in queue
$0381    invalidTag              The correct signature value was not found in the header
C
extern pascal void DeleteFromQueue(entryPtr,headerPtr) 
Docs

3️⃣




$3003

SetInterruptState

Copies the specified number of bytes from the input interrupt state record into the system interrupt variables

Parameters
Stack before call
previous contents
intStateRcdPtr Long — POINTER to interrupt state record
 
bytesDesiredWord — Number of bytes to copy from record to system
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetInterruptState(intStateRcdPtr,bytesDesired) 
Docs

3️⃣




$3103

GetInterruptState

Copies the specified number of bytes into an input interrupt record from the system interrupt variables

Parameters
Stack before call
previous contents
intStateRcdPtr Long — POINTER to interrupt state record
 
bytesDesiredWord — Number of bytes to copy from system to record
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void GetlnterruptState(intStateRcdPtr,bytesDesired) 
Docs

3️⃣




$3203

GetIntStateRecSize

Returns the size (in bytes) of the interrupt state record

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
sizeOfRecordWord — Length of interrupt state record, in bytes
SP
Errors

None

C
extern pascal Word GetIntStateRecSize() 
Docs

3️⃣




$3303

ReadMouse2

Returns the mouse position, status, and mode

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
wordspaceWord — Space for result
wordspaceWord — Space for result
SP
Stack after call
previous contents
xPositionWord — X position of the mouse
yPositionWord — Y position of the mouse
statusModeWord — Status and mode bytes
SP
Errors
$0309    unCnctdDevErr           Dispatch attempted to unconnected device
C
extern pascal MouseRec ReadMouse2() 
Docs

3️⃣




$3403

GetCodeResConverter

Returns the address of a routine that loads code resources

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
pointer Long — POINTER to code resource converter routine
 
SP
Errors

None

C
extern pascal Pointer GetCodeResConverter() 
Docs

3️⃣




$3503

GetROMResource

This call is for use only by system firmware

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C

Call must not be made by an application.

Docs

3️⃣




$3603

ReleaseROMResource

This call is for use only by system firmware

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C

Call must not be made by an application.

Docs

3️⃣




$3703

ConvSeconds

Allows conversion to and from a long integer containing the number of seconds since January 1, 1904

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
convVerbWord — Direction and type of conversion
seconds Long — Number of seconds since January 1, 1904
 
datePtr Long — POINTER to buffer for converted date
 
SP
Stack after call
previous contents
secondsOut Long — Resulting number of seconds
 
SP
Errors
$0390    badTimeVerb             Invalid convVerb value
$0391    badTimeData             Invalid date or time to be converted
C
extern pascal unsigned long ConvSeconds(convVerb,seconds,datePtr) 
Docs

📕




$3803

SysBeep2

SysBeep2 takes an integer parameter indicating what sound to make

Parameters
Stack before call
previous contents
beepTypeWord — Beep type
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SysBeep2(beepType) 
Docs

📕




$3903

VersionString

Converts a 32-bit Version number into a Pascal string

Parameters
Stack before call
previous contents
flagsWord — Reserved (pass 0)
theVersion Long — The version number to convert
 
stringPtr Long — POINTER to a 10-byte buffer
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void VersionString(flags,theVersion,stringPtr) 
Docs

📕




$3A03

WaitUntil

Provides an upper limit on the frequency of repeating actions

Parameters
Stack before call
previous contents
spaceWord — Space for result
delayFromWord — Anchor point to delay from
delayAmountWord — Specifies how long to wait for anchor
SP
Stack after call
previous contents
newTimeWord — New anchor point for next call
SP
Errors

None

C
extern pascal Word WaitUntil(delayFrom,delayAmount) 
Docs

📕




$3B03

StringToText

StringToText translates 8-bit-character text into similar text that can be displayed on the Apple IIGS text screen

Parameters
Stack before call
previous contents
spaceWord — Space for result
spaceWord — Space for result
flagsWord — Flags
textPtr Long — POINTER to source text
 
textLenWord — Length of text
resultPtr Long — POINTER to result buffer
 
SP
Stack after call
previous contents
resultFlagsWord — Result flags
printableLengthWord — Number of printing charachters in result
SP
Errors
$034F    mtBufferTooSmall        The buffer is too small
C
extern pascal Long StringToText(flags,textPtr,textLen,resultPtr) 
Docs

📕




$3C03

ShowBootInfo

Provides a way for special system extensions to make their presence known while the system is starting up

Parameters
Stack before call
previous contents
cStringPtr Long — POINTER to zero-terminated string (or NIL)
 
iconPtr Long — POINTER to DrawIcon-style icon (or NIL)
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void ShowBootInfo(cStringPtr,iconPtr) 
Docs

📕




$3D03

ScanDevices

Provides easy access to a GS/OS system service vector which checks for disk insertions

Parameters
Stack before call
previous contents
spaceWord — Space for result
SP
Stack after call
previous contents
deviceNumberWord — Device number
SP
Errors

None

C
extern pascal Word ScanDevices() 
Docs

📕




$3E03

AlertMessage

Displays a message on either the text screen or the Super Hi-Res screen and makes the user choose 1 of up to 3 buttons

Parameters
Stack before call
previous contents
spaceWord — Space for result
tablePtr Long — POINTER to the message table
 
msgNumberWord — Message index number (0, 1, 2...)
substitutions Long — POINTER to the string substitution table
 
SP
Stack after call
previous contents
buttonNumWord — Button chosen by the user
SP
Errors
$0377    onlyFromGSOS            You called AlertMessage from ProDOS 8
C
extern pascal Word AlertMessage(tablePtr,msgNumber,substitutions) 
Docs

📕




$3F03

DoSysPrefs

Clears and then sets specified bits in the GS/OS system preferences word

Parameters
Stack before call
previous contents
spaceWord — Space for result
bitsToClearWord — System preference bits to clear
bitsToSetWord — System preference bits to set
SP
Stack after call
previous contents
oldSysPrefsWord — Previous system preference word
SP
Errors
$0301    badInputErr             Bad input parameter
C
extern pascal Word DoSysPrefs(bitsToClear,bitsToSet) 
Docs

📕








QuickDraw




QuickDraw Calls
Routine#Description
QDBootInit$0104Initializes QuickDraw II; called only by the Tool Locator - not by application
QDStartUp$0204Starts up QuickDraw II for use by an application
QDShutDown$0304Shuts down QuickDraw II when an application quits
QDVersion$0404Returns the version number of QuickDraw II
QDReset$0504Resets QuickDraw II; called only when the system is reset - not by application
QDStatus$0604Indicates whether QuickDraw II is active
GetAddress$0904Returns a pointer to a specified table
GrafOn$0A04Turns on Super Hi-Res graphics mode
GrafOff$0B04Turns off Super Hi-Res graphics mode
GetStandardSCB$0C04Returns a copy of the standard scan line control byte (SCB)
InitColorTable$0D04Returns a copy of the standard color table for the current mode
SetColorTable$0E04Sets a specified color table to specified values
GetColorTable$0F04Fills a specified color table with the contents of another color table
SetColorEntry$1004Sets the value of a color in a specified color table
GetColorEntry$1104Returns the value of a specified color in a specified color table
SetSCB$1204Sets the SCB to a specified value
GetSCB$1304Returns the value of a specified SCB
SetAllSCBs$1404Sets all SCBs to a specified value
ClearScreen$1504Sets the words in screen memory to a specified value
SetMasterSCB$1604Sets the master SCB to a specified value
GetMasterSCB$1704Returns a copy of the master SCB
OpenPort$1804Initializes specified memory as a standard GrafPort, allocate a new visible region and clipping region, and set as current GrafPort.
InitPort$1904Initializes specified memory locations as a standard port
ClosePort$1A04Deallocates the clipping and visible regions in a port
SetPort$1B04Makes a specified port the current GrafPort
GetPort$1C04Returns a pointer to the current GrafPort
SetPortLoc$1D04Sets the current port's locInfo record to specified location information
GetPortLoc$1E04Gets the current port's locInfo record and puts it at the specified location
SetPortRect$1F04Sets the current GrafPort's port rectangle to the specified rectangle
GetPortRect$2004Returns the current GrafPort's port rectangle
SetPortSize$2104Changes the size of the current Grafport's port rectangle
MovePortTo$2204Changes the location of the current GrafPort's port rectangle
SetOrigin$2304Adjust contents of port & bounds rectangles so up/left corner of port rect is set at specified point
SetClip$2404Copies a specified region into the clipping region
GetClip$2504Copies the clipping region to a specified region
ClipRect$2604Changes clipping region of current GrafPort to a rectangle equal to a specified rectangle
HidePen$2704Decrements the pen level
ShowPen$2804Increments the pen level
GetPen$2904Returns the pen location
SetPenState$2A04Sets the pen state in the GrafPort to specified values
GetPenState$2B04Returns the pen state from the GrafPort to a specified location
SetPenSize$2C04Sets the current pen size to a specified pen size
GetPenSize$2D04Returns the current pen size to a specified location
SetPenMode$2E04Sets the current pen mode to a specified pen mode
GetPenMode$2F04Returns the pen mode from the current GrafPort
SetPenPat$3004Sets the current pen pattern to a specified pen pattern
GetPenPat$3104Copies the current pen pattern from the current GrafPort to a specified location
SetPenMask$3204Sets the pen mask to a specified mask
GetPenMask$3304Returns the pen mask to a specified location
SetBackPat$3404Sets the background pattern to a specified pattern
GetBackPat$3504Copies current background pen pattern from current GrafPort to a specified location
PenNormal$3604Sets the pen state to the standard state; pen location and visibility are not changed
SetSolidPenPat$3704Sets the pen pattern to a solid pattern using the specified color
SetSolidBackPat$3804Sets the background pattern to a solid pattern using a specified color
SolidPattern$3904Sets a specified pattern to a solid pattern using a specified color
MoveTo$3A04Moves the current pen location to a specified point
Move$3B04Moves the current pen location by specified horizontal & vertical displacements
LineTo$3C04Draws a line from the current pen location to a specified point
Line$3D04Draws a line from current pen location to a new point specified by the horizontal and vertical displacements
SetPicSave$3E04Sets the picSave field in the GrafPort to a specified value
GetPicSave$3F04Returns the value of the picSave field of the GrafPort
SetRgnSave$4004Sets the rgnSave field in the GrafPort ot a specified value
GetRgnSave$4104Returns the value of the rgnSave field of the GrafPort
SetPolySave$4204Sets the polySave field in the GrafPort to a specified value - not called by an application
GetPolySave$4304Returns the value of the polySave field of the GrafPort
SetGrafProcs$4404Sets the grafProcs field of the current GrafPort to a specified value
GetGrafProcs$4504Returns the pointer to the grafProcs record associated witht the GrafPort
SetUserField$4604Sets the userField in the GrafPort to a specified value
GetUserField$4704Returns the value of the userField field of the GrafPort
SetSysField$4804Sets the sysField field in GrafPort to a specified value - not called by an application
GetSysField$4904Returns the value of the sysField field of the GrafPort
SetRect$4A04Sets a specified rectangle to specified values
OffsetRect$4B04Offsets a specified rectangle by specified displacements
InsetRect$4C04Insets a specified rectangle by specified displacements
SectRect$4D04Calculates intersection of two rectangles & places intersection in destination rectangle
UnionRect$4E04Calculates smallest rectangle that contains both src rect & places results in dest rect
PtInRect$4F04Detects whether the pixel below and to the right of specified point is in a specified rectangle
Pt2Rect$5004Copies specified pt to uppr left corner of specified rect & another pt to lower right corner of rect
EqualRect$5104Indicates whether two rectangles are equal
NotEmptyRect$5204Indicates whether a specified rectangle is empty
FrameRect$5304Draws the frame of a specified rectangle using the current pen mode, pattern, & size
PaintRect$5404Paints the interior of specified rectangle using the current pen mode & pattern
EraseRect$5504Erases the interior of a specified rectangle by filling it in with the background pattern
InvertRect$5604Inverts the pixels in the interior of a specified rectangle
FillRect$5704Fills the interior of a specified rectangle with a specified pen pattern
FrameOval$5804Draws the frame of a specified oval using the current pen mode, pattern, & size
PaintOval$5904Paints the interior of a specified oval using the current pen mode & pattern
EraseOval$5A04Erases the interior of a specified oval by filling it in with the backround pattern
InvertOval$5B04Inverts the pixels in the interior of a specified oval
FillOval$5C04Fills the interior of a specified oval with a specified pen pattern
FrameRRect$5D04Draws the frame of a specified round rectangle using the current pen mode, pattern & size
PaintRRect$5E04Paints interior of specified round rectangle using the current pen mode & pattern
EraseRRect$5F04Erases interior of a specified round rectangle by filling it in with the backround pattern
InvertRRect$6004Inverts the pixels in the interior of a specified round rectangle
FillRRect$6104Fills the interior of a specified round rectangle with a specified pen pattern
FrameArc$6204Draws the frame of a specified arc using the current pen mode, pattern, & size
PaintArc$6304Paints the interior of specified arc using the current pen mode & pattern
EraseArc$6404Erases the interior of a specified arc by filling it in with the backround pattern
InvertArc$6504Inverts the pixels in the interior of a specified arc
FillArc$6604Fills the interior of a specified arc with a specified pen pattern
NewRgn$6704Allocates space for a new region & initializes it to empty - only way to create new region
DisposeRgn$6804Deallocates the memory for a specified region
CopyRgn$6904Copies the region definition from one region to another
SetEmptyRgn$6A04Destroys previous region information by setting a specified region to an empty region
SetRectRgn$6B04Destroys previous region information by setting a specified region to a specified rectangle
RectRgn$6C04Destroys previous region information by setting a specified region to a specified rectangle
OpenRgn$6D04Allocates temp space & starts saving lines & framed shapes for later processing as a region definition.
CloseRgn$6E04Completes the region definition process started by an OpenRgn call
OffsetRgn$6F04Moves a region on the coordinate plane a specified distance
InsetRgn$7004Shrinks or expands a specified region
SectRgn$7104Calculates intersection of two regions & places intersection in a destination region
UnionRgn$7204Calculates smallest region that contains every point that's in either source region and places result in destination region
DiffRgn$7304Calculates the difference of two regions and places difference in a destination region
XorRgn$7404Calculates the difference between the union and the intersection of two regions and places result in a destination region
PtInRgn$7504Checks to see whether the pixel below & to right of a specified point1 is within a specified region
RectInRgn$7604Checks whether a specified rectangle intersects a specified region
EqualRgn$7704Indicates whether two regions are equal
EmptyRgn$7804Indicates whether a specified region is empty
FrameRgn$7904Draws the frame of a specified region using current pen mode, pattern & size
PaintRgn$7A04Paints the interior of a specified region using the current pen mode & pattern
EraseRgn$7B04Erases the interior of a specified region by filling it with the background pattern
InvertRgn$7C04Inverts the pixels in the interior of a specified region
FillRgn$7D04Fills the interior of a specified region with a specified pen pattern
ScrollRect$7E04Shifts pixels inside intersect of specified rect, visble region, clip region, port rect, and bounds rect
PaintPixels$7F04Transfers a region of pixels
AddPt$8004Adds two specified points together and leaves result in destination point
SubPt$8104Subtracts source point from destination point and leaves result in the destination point
SetPt$8204Sets a point to specified horizontal and vertical values
EqualPt$8304Indicates whether two points are equal
LocalToGlobal$8404Converts a point from local coordinates to global coordinates
GlobalToLocal$8504Converts a point from global coordinates to local coordinates
Random$8604Returns a pseudorandom number in the range -32768 to 32767
SetRandSeed$8704Sets the seed value for the random number generator
GetPixel$8804Returns the pixel below and to the right of a specified point
ScalePt$8904Scales a specified point from a source rectangle to a destination rectangle
MapPt$8A04Maps a specified point from a source rectangle to a destination rectangle
MapRect$8B04Maps a specified rectangle from a source rectangle to a destination rectangle
MapRgn$8C04Maps a specified region from a source rectangle to a destination rectangle
SetStdProcs$8D04Sets up a specified record of pointers for customizing QuickDraw II operations
SetCursor$8E04Sets the cursor to an image passed in a specified cursor record
GetCursorAdr$8F04Returns a pointer to the current cursor record
HideCursor$9004Hides the cursor by decrementing the cursor level
ShowCursor$9104Shows the cursor by incrementing the cursor level
ObscureCursor$9204Hides the cursor until the mouse moves
SetFont$9404Sets the current font to a specified font
GetFont$9504Returns a handle to the current font
GetFontInfo$9604Returns information about the current font in a specified record
GetFontGlobals$9704Returns information about the current font in a specified record
SetFontFlags$9804Sets the font flags word to a specified value
GetFontFlags$9904Returns the current font flags word
SetTextFace$9A04Sets the text face to a specified value
GetTextFace$9B04Returns the current text face
SetTextMode$9C04Sets the text mode to a specified value
GetTextMode$9D04Returns the current text mode
SetSpaceExtra$9E04Sets the spExtra field in the GrafPort to a specified value
GetSpaceExtra$9F04Returns the value of the spExtra field from the GrafPort
SetForeColor$A004Sets the fgColor field (foreground color) in the GrafPort to a specified value
GetForeColor$A104Returns the value of the current fgColor field (foreground color) from the GrafPort
SetBackColor$A204Sets the bgColor field (background color) in the GrafPort to a specified value
GetBackColor$A304Returns the value of the current bgColor field (background color) from the GrafPort
DrawChar$A404Draws a specified character at current pen location and updates pen location
DrawString$A504Draws a specified Pascal-type string at the current pen location and updates the pen location.
DrawCString$A604Draws a specified C string at the current pen location and updates the pen location
DrawText$A704Draws specified text at the current pen location and updates pen location
CharWidth$A804Returns the character width, in pixels (pen displacement), of a specified character
StringWidth$A904Returns sum of all char widths, in pixels (pen displacements), of specified Pascal-type string.
CStringWidth$AA04Returns sum of all char widths, in pixels (pen displacements), of specified C string
TextWidth$AB04Returns the character width, in pixels (pen displacements), of specified text
CharBounds$AC04Puts the character bounds rectangle of a specified character into a specified buffer
StringBounds$AD04Puts the character bounds rectangle of a specified Pascal-type string into specified buffer
CStringBounds$AE04Puts char bounds rectangle of a specified C string into a specified buffer
TextBounds$AF04Puts the character bounds rectangle of specified text into a specified buffer
SetArcRot$B004Sets the arcRot field in the GrafPort to a specified value
GetArcRot$B104Returns the value of the arcRot field in the current GrafPort
SetSysFont$B204Sets a specified font as the system font
GetSysFont$B304Returns a handle to the current system font
SetVisRgn$B404Copies specified region into the visible region (but does not change the visRgn field of the GrafPort).
GetVisRgn$B504Copies the contents of the visible region into a specified region. The region must have already been created with a NewRgn call.
SetIntUse$B604Indicates to the cursor drawing code whether the code should use scan line interrupts.
OpenPicture$B704Allocates memory for the recording of drawing commands into a picture definition, and returns a handle to the picture.
PicComment$B804Inserts a specified comment into the currently open picture.
ClosePicture$B904Completes the picture definition process begun by OpenPicture call.
DrawPicture$BA04Takes drawing commands recorded in pic definition, maps them from picture frame into destination rectangle, and draws them.
KillPicture$BB04Releases all memory occupied by a specifed picture.
FramePoly$BC04Draws the frame of a specified polygon using the current pen mode, pattern, & size. Poly is framed with a series of LineTo calls.
PaintPoly$BD04Paints the interior of a specified polygon using the current pen mode & pattern.
ErasePoly$BE04Erases the interior of a specified polygon by filling it with the background pattern
InvertPoly$BF04Inverts the pixels in the interior of a specified polygon.
FillPoly$C004Fills the interior of a specified polygon with a specified pen pattern.
OpenPoly$C104Returns a handle to a polygon data structure that will be updated by future LineTo calls.
ClosePoly$C204Completes the polygon definition process started with an OpenPoly call.
KillPoly$C304Disposes of a specified polygon.
OffsetPoly$C404Offsets a specified polygon by specified horizontal & vertical displacements.
MapPoly$C504Maps a specified polygon from a source rectangle to a destination rectangle
SetClipHandle$C604Sets the clipRgn handle field in the GrafPort to a specified value.
GetClipHandle$C704Returns a copy of the handle to the clipping region.
SetVisHandle$C804Sets the visRgn field in the GrafPort to a specified value.
GetVisHandle$C904Returns a copy of the handle to the visible region.
InitCursor$CA04Reinitializes the cursor. The cursor is set to the arrow cursor and made visible.
SetBufDims$CB04Sets size of QD II clipping and text buffers, padding to allow mods to chExtra & spExtra
ForceBufDims$CC04Sets size of QD II clipping and text buffers, but doesn't pad maxFBRExtent in any way.
SaveBufDims$CD04Saves QD II's buffer-sizing information in eight-byte record.
RestoreBufDims$CE04Restores QD II's internal buffers to sizes described in an 8-byte record created by SaveBufDims
GetFGSize$CF04Returns the size of the font globals record.
SetFontID$D004Sets the fontID field in the GrafPort.
GetFontID$D104Returns the fontID field of the GrafPort.
SetTextSize$D204Sets the txSize field of the GrafPort to a specified value.
GetTextSize$D304Returns current value of the txSize field of the GrafPort.
SetCharExtra$D404Sets the chExtra field in the GrafPort to a specified value.
GetCharExtra$D504Returns the chExtra field from the GrafPort
PPToPort$D604Transfers pixels from a source pixel map to current port & clips pixels to current visble region & clipping region
InflateTextBuffer$D704Ensures that the text buffer is big enough to handle a font with the specified width and height, increasing it if necessary.
GetROMFont$D804Fills a specified buffer with information about the font in ROM
GetFontLore$D904Returns info, up to a specified number of bytes, about the current font in a specified buffer
Get640Colors$DA04Returns a pointer to a 512-byte table of 32 $00s, 32 $11s, ..., 32 $FFs, to be used as solid pen patterns.
Set640Color$DB05Sets the current grafport's pen pattern to any of the 16 "solid" 640-mode dithered colors

QuickDraw Calls


$0104

QDBootInit

Initializes QuickDraw II; called only by the Tool Locator - not by application

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C

Call must not be made by an application.

Docs

2️⃣




$0204

QDStartUp

Starts up QuickDraw II for use by an application

Parameters
Stack before call
previous contents
dPageAddrWord — Bank $0 starting address for 3 pages of direct-page space
masterSCBWord — Master SCB for super Hi-Res graphics
maxWidthWord — INTEGER; size in bytes of largest pixel map, 0 for screen width
userIDWord — User ID of application
SP
Stack after call
previous contents
SP
Errors
$0401    alreadyInitialized      QuickDraw II is already initialized
$0410    screenReserved          Screen reserved
Memory Manager errors            Returned unchanged
C
extern pascal void QDStartUp(dPageAddr,masterSCB,maxWidth,userID) 
Docs

2️⃣ 3️⃣ 📕




$0304

QDShutDown

Shuts down QuickDraw II when an application quits

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors
Memory Manager errors            Returned unchanged
C
extern pascal void QDShutDown() 
Docs

2️⃣ 📕




$0404

QDVersion

Returns the version number of QuickDraw II

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
versionInfoWord — Version number of QuickDraw II
SP
Errors

None

C
extern pascal Word QDVersion() 
Docs

2️⃣




$0504

QDReset

Resets QuickDraw II; called only when the system is reset - not by application

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C

Call must not be made by an application.

Docs

2️⃣




$0604

QDStatus

Indicates whether QuickDraw II is active

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
activeFlagWord — BOOLEAN; TRUE if QuickDraw II is active, FALSE if not
SP
Errors

None

C
extern pascal Boolean QDStatus() 
Docs

1️⃣




$0904

GetAddress

Returns a pointer to a specified table

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
tableIDWord — ID of table whose pointer will be retrieved
SP
Stack after call
previous contents
tablePtr Long — POINTER to table in ROM
 
SP
Errors

None

C
extern pascal Pointer GetAddress(tableID) 
Docs

1️⃣




$0A04

GrafOn

Turns on Super Hi-Res graphics mode

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void GrafOn() 
Docs

2️⃣




$0B04

GrafOff

Turns off Super Hi-Res graphics mode

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void GrafOff() 
Docs

2️⃣




$0C04

GetStandardSCB

Returns a copy of the standard scan line control byte (SCB)

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
scbWord — Standard SCB (see Toolbox Ref Vol2 Figure 16-34)
SP
Errors

None

C
extern pascal Word GetStandardSCB() 
Docs

2️⃣




$0D04

InitColorTable

Returns a copy of the standard color table for the current mode

Parameters
Stack before call
previous contents
tablePtr Long — POINTER to space for standard color table (see Toolbox Ref Vol2 Figure 16-7)
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void InitColorTable(tablePtr) 
Docs

2️⃣




$0E04

SetColorTable

Sets a specified color table to specified values

Parameters
Stack before call
previous contents
tableNumberWord — INTEGER; number of table whose color values will be set
srcTablePtr Long — POINTER to color table
 
SP
Stack after call
previous contents
SP
Errors
$0450    badTableNum             Invalid color table number; 0 to 15 are valid
C
extern pascal void SetColorTable(tableNumber,srcTablePtr) 
Docs

2️⃣




$0F04

GetColorTable

Fills a specified color table with the contents of another color table

Parameters
Stack before call
previous contents
tableNumberWord — INTEGER; color table to be copied
destTablePtr Long — POINTER to color table to receive new values
 
SP
Stack after call
previous contents
SP
Errors
$0450    badTableNum             Invalid color table number; 0 to 15 are valid
C
extern pascal void GetColorTable(tableNumber,destTablePtr) 
Docs

2️⃣




$1004

SetColorEntry

Sets the value of a color in a specified color table

Parameters
Stack before call
previous contents
tableNumberWord — INTEGER; number of color table
entryNumberWord — INTEGER; number of color to be changed
newColorWord — INTEGER; master color value for color
SP
Stack after call
previous contents
SP
Errors
$0450    badTableNum             Invalid color table number; 0 to 15 are valid
$0451    badColorNum             Invalid color number; 0 to 15 are valid
C
extern pascal void SetColorEntry(tableNumber,entryNumber,newColor) 
Docs

2️⃣




$1104

GetColorEntry

Returns the value of a specified color in a specified color table

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
tableNumberWord — INTEGER; number of color table
entryNumberWord — INTEGER; number of color to be examined
SP
Stack after call
previous contents
SP
Errors
$0450    badTableNum             Invalid color table number; 0 to 15 are valid
$0451    badColorNum             Invalid color number; 0 to 15 are valid
C
extern pascal Word GetColorEntry(tableNumber,entryNumber) 
Docs

2️⃣




$1204

SetSCB

Sets the SCB to a specified value

Parameters
Stack before call
previous contents
scanLineWord — INTEGER; scan line whose SCB is to be set
newSCBWord — INTEGER; new value for SCB
SP
Stack after call
previous contents
SP
Errors
$0452    badScanLine             Invalid scan line number; 0 to 199 are valid
C
extern pascal void SetSCB(scanLine,newSCB) 
Docs

2️⃣




$1304

GetSCB

Returns the value of a specified SCB

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
scanLineWord — INTEGER; new value for SCB
SP
Stack after call
previous contents
scbWord — Value of SCB
SP
Errors
$0452    badScanLine             Invalid scan line number; 0 to 199 are valid
C
extern pascal Word GetSCB(scanLine) 
Docs

2️⃣




$1404

SetAllSCBs

Sets all SCBs to a specified value

Parameters
Stack before call
previous contents
newSCBWord — new value for SCB
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetAllSCBs(newSCB) 
Docs

2️⃣




$1504

ClearScreen

Sets the words in screen memory to a specified value

Parameters
Stack before call
previous contents
colorWordWord — Color as offset into current color table
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void ClearScreen(colorWord) 
Docs

2️⃣




$1604

SetMasterSCB

Sets the master SCB to a specified value

Parameters
Stack before call
previous contents
masterSCBWord — Value for master SCB (low-order byte only; high-order byte=0)
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetMasterSCB(masterSCB) 
Docs

2️⃣




$1704

GetMasterSCB

Returns a copy of the master SCB

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
masterSCBWord — Master SCB value
SP
Errors

None

C
extern pascal Word GetMasterSCB() 
Docs

2️⃣




$1804

OpenPort

Initializes specified memory as a standard GrafPort, allocate a new visible region and clipping region, and set as current GrafPort.

Parameters
Stack before call
previous contents
portPtr Long — POINTER to space for GrafPort record
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void OpenPort(portPtr) 
Docs

2️⃣




$1904

InitPort

Initializes specified memory locations as a standard port

Parameters
Stack before call
previous contents
portPtr Long — POINTER to port
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void InitPort(portPtr) 
Docs

2️⃣




$1A04

ClosePort

Deallocates the clipping and visible regions in a port

Parameters
Stack before call
previous contents
portPtr Long — POINTER to port
 
SP
Stack after call
previous contents
SP
Errors
Memory Manager errors            Returned unchanged
C
extern pascal void ClosePort(portPtr) 
Docs

2️⃣




$1B04

SetPort

Makes a specified port the current GrafPort

Parameters
Stack before call
previous contents
portPtr Long — POINTER to port
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetPort(portPtr) 
Docs

2️⃣




$1C04

GetPort

Returns a pointer to the current GrafPort

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
resultPtr Long — POINTER to GrafPort
 
SP
Errors

None

C
extern pascal GrafPortPtr GetPort() 
Docs

2️⃣




$1D04

SetPortLoc

Sets the current port's locInfo record to specified location information

Parameters
Stack before call
previous contents
locInfoPtr Long — POINTER to location information
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetPortLoc(locInfoPtr) 
Docs

2️⃣




$1E04

GetPortLoc

Gets the current port's locInfo record and puts it at the specified location

Parameters
Stack before call
previous contents
locInfoPtr Long — POINTER to space for locInfo record
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void GetPortLoc(locInfoPtr) 
Docs

2️⃣




$1F04

SetPortRect

Sets the current GrafPort's port rectangle to the specified rectangle

Parameters
Stack before call
previous contents
rectPtr Long — POINTER to RECT defining rectangle
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetPortRect(rectPtr) 
Docs

2️⃣




$2004

GetPortRect

Returns the current GrafPort's port rectangle

Parameters
Stack before call
previous contents
rectPtr Long — POINTER to RECT defining rectangle
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void GetPortRect(rectPtr) 
Docs

2️⃣




$2104

SetPortSize

Changes the size of the current Grafport's port rectangle

Parameters
Stack before call
previous contents
portWidthWord — INTEGER; width of active area in pixels
portHeightWord — INTEGER; height of active area in pixels
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetPortSize(portWidth,portHeight) 
Docs

2️⃣




$2204

MovePortTo

Changes the location of the current GrafPort's port rectangle

Parameters
Stack before call
previous contents
hWord — INTEGER; horizontal coordinate of upper left corner
vWord — INTEGER; vertical coordinate of upper left corner
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void MovePortTo(h,v) 
Docs

2️⃣




$2304

SetOrigin

Adjust contents of port & bounds rectangles so up/left corner of port rect is set at specified point

Parameters
Stack before call
previous contents
hWord — INTEGER; horizontal coordinate of upper left corner
vWord — INTEGER; vertical coordinate of upper left corner
SP
Stack after call
previous contents
SP
Errors
Memory Manager errors            Returned unchanged
C
extern pascal void SetOrigin(h,v) 
Docs

2️⃣




$2404

SetClip

Copies a specified region into the clipping region

Parameters
Stack before call
previous contents
rgnHandle Long — HANDLE to region
 
SP
Stack after call
previous contents
SP
Errors
Memory Manager errors            Returned unchanged
C
extern pascal void SetClip(rgnHandle) 
Docs

2️⃣




$2504

GetClip

Copies the clipping region to a specified region

Parameters
Stack before call
previous contents
rgnHandle Long — HANDLE to region
 
SP
Stack after call
previous contents
SP
Errors
Memory Manager errors            Returned unchanged
C
extern pascal void GetClip(rgnHandle) 
Docs

2️⃣




$2604

ClipRect

Changes clipping region of current GrafPort to a rectangle equal to a specified rectangle

Parameters
Stack before call
previous contents
rectPtr Long — POINTER to RECT defining rectangle
 
SP
Stack after call
previous contents
SP
Errors
Memory Manager errors            Returned unchanged
C
extern pascal void ClipRect(rectPtr) 
Docs

2️⃣




$2704

HidePen

Decrements the pen level

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void HidePen() 
Docs

2️⃣




$2804

ShowPen

Increments the pen level

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void ShowPen() 
Docs

2️⃣




$2904

GetPen

Returns the pen location

Parameters
Stack before call
previous contents
pointPtr Long — POINTER to POINT
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void GetPen(pointPtr) 
Docs

2️⃣




$2A04

SetPenState

Sets the pen state in the GrafPort to specified values

Parameters
Stack before call
previous contents
penStatePtr Long — POINTER to pen state record (see Toolbox Ref Vol2 Figure 16-38)
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetPenState(penStatePtr) 
Docs

2️⃣




$2B04

GetPenState

Returns the pen state from the GrafPort to a specified location

Parameters
Stack before call
previous contents
penStatePtr Long — POINTER to space for pen state record
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void GetPenState(penStatePtr) 
Docs

2️⃣




$2C04

SetPenSize

Sets the current pen size to a specified pen size

Parameters
Stack before call
previous contents
penWidthWord — INTEGER; width of pen in pixels
penHeightWord — INTEGER; height of pen in pixels
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetPenSize(penWidth,penHeight) 
Docs

2️⃣




$2D04

GetPenSize

Returns the current pen size to a specified location

Parameters
Stack before call
previous contents
penStatePtr Long — POINTER to space for POINT
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void GetPenSize(pointPtr) 
Docs

2️⃣




$2E04

SetPenMode

Sets the current pen mode to a specified pen mode

Parameters
Stack before call
previous contents
penModeWord — INTEGER; new pen mode (see Toolbox Ref Vol2 Figure 16-9)
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetPenMode(penMode) 
Docs

2️⃣




$2F04

GetPenMode

Returns the pen mode from the current GrafPort

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
penModeWord — INTEGER; pen mode value (see Toolbox Ref Vol2 Figure 16-9)
SP
Errors

None

C
extern pascal Word GetPenMode() 
Docs

2️⃣




$3004

SetPenPat

Sets the current pen pattern to a specified pen pattern

Parameters
Stack before call
previous contents
patternPtr Long — POINTER to pattern
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetPenPat(patternPtr) 
Docs

2️⃣




$3104

GetPenPat

Copies the current pen pattern from the current GrafPort to a specified location

Parameters
Stack before call
previous contents
patternPtr Long — POINTER to space for pattern
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void GetPenPat(patternPtr) 
Docs

2️⃣




$3204

SetPenMask

Sets the pen mask to a specified mask

Parameters
Stack before call
previous contents
maskPtr Long — POINTER to pen mask
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetPenMask(maskPtr) 
Docs

2️⃣




$3304

GetPenMask

Returns the pen mask to a specified location

Parameters
Stack before call
previous contents
maskPtr Long — POINTER to space for mask
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void GetPenMask(maskPtr) 
Docs

2️⃣




$3404

SetBackPat

Sets the background pattern to a specified pattern

Parameters
Stack before call
previous contents
patternPtr Long — POINTER to pattern
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetBackPat(patternPtr) 
Docs

2️⃣




$3504

GetBackPat

Copies current background pen pattern from current GrafPort to a specified location

Parameters
Stack before call
previous contents
patternPtr Long — POINTER to location for pattern
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void GetBackPat(patternPtr) 
Docs

2️⃣




$3604

PenNormal

Sets the pen state to the standard state; pen location and visibility are not changed

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void PenNormal() 
Docs

2️⃣




$3704

SetSolidPenPat

Sets the pen pattern to a solid pattern using the specified color

Parameters
Stack before call
previous contents
colorNumWord — INTEGER; new color value
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetSolidPenPat(colorNum) 
Docs

2️⃣




$3804

SetSolidBackPat

Sets the background pattern to a solid pattern using a specified color

Parameters
Stack before call
previous contents
colorNumWord — INTEGER; new color value
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetSolidBackPat(colorNum) 
Docs

2️⃣




$3904

SolidPattern

Sets a specified pattern to a solid pattern using a specified color

Parameters
Stack before call
previous contents
colorNumWord — INTEGER; new color value
patternPtr Long — POINTER to pattern
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SolidPattern(colorNum,patternPtr) 
Docs

2️⃣




$3A04

MoveTo

Moves the current pen location to a specified point

Parameters
Stack before call
previous contents
hWord — INTEGER; horizontal point in local coordinates
vWord — INTEGER; vertical point in local coordinates
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void MoveTo(h,v) 
Docs

2️⃣




$3B04

Move

Moves the current pen location by specified horizontal & vertical displacements

Parameters
Stack before call
previous contents
dHWord — INTEGER; horizontal displacement
dVWord — INTEGER; vertical displacement
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void Move(dH,dV) 
Docs

2️⃣




$3C04

LineTo

Draws a line from the current pen location to a specified point

Parameters
Stack before call
previous contents
hWord — INTEGER; horizontal point to which line will be drawn
vWord — INTEGER; vertical point to which line will be drawn
SP
Stack after call
previous contents
SP
Errors
Memory Manager errors            Returned unchanged
C
extern pascal void LineTo(h,v) 
Docs

2️⃣




$3D04

Line

Draws a line from current pen location to a new point specified by the horizontal and vertical displacements

Parameters
Stack before call
previous contents
dHWord — INTEGER; horizontal displacement in points
dVWord — INTEGER; vertical displacement in points
SP
Stack after call
previous contents
SP
Errors
Memory Manager errors            Returned unchanged
C
extern pascal void Line(dH,dV) 
Docs

2️⃣




$3E04

SetPicSave

Sets the picSave field in the GrafPort to a specified value

Parameters
Stack before call
previous contents
picSaveValue Long — New value for picSave field
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetPicSave(picSaveValue) 
Docs

2️⃣




$3F04

GetPicSave

Returns the value of the picSave field of the GrafPort

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
picSaveValue Long — Current picSave value
 
SP
Errors

None

C
extern pascal Longint GetPicSave() 
Docs

2️⃣




$4004

SetRgnSave

Sets the rgnSave field in the GrafPort ot a specified value

Parameters
Stack before call
previous contents
rgnSaveValue Long — HANDLE; new value of rgnSave field
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetRgnSave(rgnSaveValue) 
Docs

2️⃣




$4104

GetRgnSave

Returns the value of the rgnSave field of the GrafPort

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
rgnSaveValue Long — Current rgnSave value
 
SP
Errors

None

C
extern pascal LongWord GetRgnSave() 
Docs

2️⃣




$4204

SetPolySave

Sets the polySave field in the GrafPort to a specified value - not called by an application

Parameters
Stack before call
previous contents
polySaveValue Long — New value for polySave field
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetPolySave(polySaveValue) 
Docs

2️⃣




$4304

GetPolySave

Returns the value of the polySave field of the GrafPort

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
polySaveValue Long — Current polySave value
 
SP
Errors

None

C
extern pascal LongWord GetPolySave() 
Docs

2️⃣




$4404

SetGrafProcs

Sets the grafProcs field of the current GrafPort to a specified value

Parameters
Stack before call
previous contents
grafProcsPtr Long — POINTER to grafProcs record
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetGrafProcs(grafProcsPtr) 
Docs

2️⃣




$4504

GetGrafProcs

Returns the pointer to the grafProcs record associated witht the GrafPort

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
grafProcsPtr Long — POINTER to grafProcs record
 
SP
Errors

None

C
extern pascal QDProcsPtr GetGraphProcs() 
Docs

2️⃣




$4604

SetUserField

Sets the userField in the GrafPort to a specified value

Parameters
Stack before call
previous contents
userFieldValue Long — New value for userField field
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetUserField(userFieldValue) 
Docs

2️⃣




$4704

GetUserField

Returns the value of the userField field of the GrafPort

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
userField Long — Current userField value
 
SP
Errors

None

C
extern pascal Longint GetUserField() 
Docs

2️⃣




$4804

SetSysField

Sets the sysField field in GrafPort to a specified value - not called by an application

Parameters
Stack before call
previous contents
sysFieldValue Long — New value for sysField field
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetSysField(sysFieldValue) 
Docs

2️⃣




$4904

GetSysField

Returns the value of the sysField field of the GrafPort

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
sysField Long — Current sysField value
 
SP
Errors

None

C
extern pascal Longint GetSysField() 
Docs

2️⃣




$4A04

SetRect

Sets a specified rectangle to specified values

Parameters
Stack before call
previous contents
rectPtr Long — POINTER to space for RECT defining rectangle to be set
 
leftWord — INTEGER; left X coordinate for rectangle
topWord — INTEGER; top Y coordinate for rectangle
rightWord — INTEGER; right X coordinate for rectangle
bottomWord — INTEGER; bottom Y coordinate for rectangle
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetRect(rectPtr,left,top,right,bottom) 
Docs

2️⃣




$4B04

OffsetRect

Offsets a specified rectangle by specified displacements

Parameters
Stack before call
previous contents
rectPtr Long — POINTER to rectangle
 
dHWord — INTEGER; horizontal displacement in pixels
dVWord — INTEGER; vertical displacement in pixels
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void OffsetRect(rectPtr,dH,dV) 
Docs

2️⃣




$4C04

InsetRect

Insets a specified rectangle by specified displacements

Parameters
Stack before call
previous contents
rectPtr Long — POINTER to rectangle
 
dHWord — INTEGER; horizontal displacement
dVWord — INTEGER; vertical displacement
SP
Stack after call
previous contents
SP
Errors
Memory Manager errors            Returned unchanged
C
extern pascal void InsetRect(rectPtr,dH,dV) 
Docs

2️⃣




$4D04

SectRect

Calculates intersection of two rectangles & places intersection in destination rectangle

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
rect1Ptr Long — POINTER to RECT defining first source rectangle
 
rect2Ptr Long — POINTER to RECT defining second source rectangle
 
intersectRectPtr Long — POINTER to RECT defining destination rectangle
 
SP
Stack after call
previous contents
notEmptyFlagWord — BOOLEAN; TRUE if rectangle not empty, FALSE if empty
SP
Errors

None

C
extern pascal Boolean SectRect(rect1Ptr,rect2Ptr,intersectRectPtr) 
Docs

2️⃣




$4E04

UnionRect

Calculates smallest rectangle that contains both src rect & places results in dest rect

Parameters
Stack before call
previous contents
rect1Ptr Long — POINTER to first source rectangle
 
rect2Ptr Long — POINTER to second source rectangle
 
unionRectPtr Long — POINTER to destination rectangle
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void UnionRect(rect1Ptr,rect2Ptr,unionRectPtr) 
Docs

2️⃣




$4F04

PtInRect

Detects whether the pixel below and to the right of specified point is in a specified rectangle

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
pointPtr Long — POINTER to POINT
 
rectPtr Long — POINTER to RECT defining rectangle
 
SP
Stack after call
previous contents
pointFlagWord — BOOLEAN; TRUE if pixel in rectangle, FALSE if not
SP
Errors

None

C
extern pascal Boolean PtInRect(pointPtr,rectPtr) 
Docs

2️⃣




$5004

Pt2Rect

Copies specified pt to uppr left corner of specified rect & another pt to lower right corner of rect

Parameters
Stack before call
previous contents
point1Ptr Long — POINTER to first source POINT
 
point2Ptr Long — POINTER to second source POINT
 
rectPtr Long — POINTER to destination rectangle
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void Pt2Rect(point1Ptr,point2Ptr,rectPtr) 
Docs

2️⃣




$5104

EqualRect

Indicates whether two rectangles are equal

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
rect1Ptr Long — POINTER to RECT defining one rectangle
 
rect2Ptr Long — POINTER to RECT defining other rectangle
 
SP
Stack after call
previous contents
equalFlagWord — BOOLEAN; TRUE if rectangles are equal, FALSE if not
SP
Errors

None

C
extern pascal Boolean EqualRect(rect1Ptr,rect2Ptr) 
Docs

2️⃣




$5204

NotEmptyRect

Indicates whether a specified rectangle is empty

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
rectPtr Long — POINTER to RECT defining rectangle
 
SP
Stack after call
previous contents
notEmptyFlagWord — BOOLEAN; TRUE if rectangle not empty, FALSE if empty
SP
Errors

None

C
extern pascal Boolean NotEmptyRect(rectPtr) 
Docs

2️⃣




$5304

FrameRect

Draws the frame of a specified rectangle using the current pen mode, pattern, & size

Parameters
Stack before call
previous contents
rectPtr Long — POINTER to RECT defining rectangle
 
SP
Stack after call
previous contents
SP
Errors
Memory Manager errors            Returned unchanged
C
extern pascal void FrameRect(rectPtr) 
Docs

2️⃣




$5404

PaintRect

Paints the interior of specified rectangle using the current pen mode & pattern

Parameters
Stack before call
previous contents
rectPtr Long — POINTER to RECT defining enclosing rectangle
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void PaintRect(rectPtr) 
Docs

2️⃣




$5504

EraseRect

Erases the interior of a specified rectangle by filling it in with the background pattern

Parameters
Stack before call
previous contents
rectPtr Long — POINTER to RECT defining rectangle
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void EraseRect(rectPtr) 
Docs

2️⃣




$5604

InvertRect

Inverts the pixels in the interior of a specified rectangle

Parameters
Stack before call
previous contents
rectPtr Long — POINTER to RECT defining rectangle
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void InvertRect(rectPtr) 
Docs

2️⃣




$5704

FillRect

Fills the interior of a specified rectangle with a specified pen pattern

Parameters
Stack before call
previous contents
rectPtr Long — POINTER to rectangle
 
patternPtr Long — POINTER to pattern
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void FillRect(rectPtr,patternPtr) 
Docs

2️⃣




$5804

FrameOval

Draws the frame of a specified oval using the current pen mode, pattern, & size

Parameters
Stack before call
previous contents
rectPtr Long — POINTER to RECT defining enclosing rectangle
 
SP
Stack after call
previous contents
SP
Errors
Memory Manager errors            Returned unchanged
C
extern pascal void FrameOval(rectPtr) 
Docs

2️⃣




$5904

PaintOval

Paints the interior of a specified oval using the current pen mode & pattern

Parameters
Stack before call
previous contents
rectPtr Long — POINTER to RECT defining enclosing rectangle
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void PaintOval(rectPtr) 
Docs

2️⃣




$5A04

EraseOval

Erases the interior of a specified oval by filling it in with the backround pattern

Parameters
Stack before call
previous contents
rectPtr Long — POINTER to RECT defining enclosing rectangle
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void EraseOval(rectPtr) 
Docs

2️⃣




$5B04

InvertOval

Inverts the pixels in the interior of a specified oval

Parameters
Stack before call
previous contents
rectPtr Long — POINTER to RECT defining enclosing rectangle
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void InvertOval(rectPtr) 
Docs

2️⃣




$5C04

FillOval

Fills the interior of a specified oval with a specified pen pattern

Parameters
Stack before call
previous contents
rectPtr Long — POINTER to RECT defining enclosing rectangle
 
patternPtr Long — POINTER to pattern
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void FillOval(rectPtr,patternPtr) 
Docs

2️⃣




$5D04

FrameRRect

Draws the frame of a specified round rectangle using the current pen mode, pattern & size

Parameters
Stack before call
previous contents
rectPtr Long — POINTER to RECT defining enclosing rectangle
 
ovalWidthWord — INTEGER; width, in pixels, of oval defining rounded corners
ovalHeightWord — INTEGER; height, in pixels, of oval defining rounded corners
SP
Stack after call
previous contents
SP
Errors
Memory Manager errors            Returned unchanged
C
extern pascal void FrameRRect(rectPtr,ovalWidth,ovalHeight) 
Docs

2️⃣




$5E04

PaintRRect

Paints interior of specified round rectangle using the current pen mode & pattern

Parameters
Stack before call
previous contents
rectPtr Long — POINTER to RECT defining enclosing rectangle
 
ovalWidthWord — INTEGER; width, in pixels, of oval defining rounded corners
ovalHeightWord — INTEGER; height, in pixels, of oval defining rounded corners
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void PaintRRect(rectPtr,ovalWidth,ovalHeight) 
Docs

2️⃣




$5F04

EraseRRect

Erases interior of a specified round rectangle by filling it in with the backround pattern

Parameters
Stack before call
previous contents
rectPtr Long — POINTER to RECT defining enclosing rectangle
 
ovalWidthWord — INTEGER; width, in pixels, of oval defining rounded corners
ovalHeightWord — INTEGER; height, in pixels, of oval defining rounded corners
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void EraseRRect(rectPtr,ovalWidth,ovalHeight) 
Docs

2️⃣




$6004

InvertRRect

Inverts the pixels in the interior of a specified round rectangle

Parameters
Stack before call
previous contents
rectPtr Long — POINTER to RECT defining enclosing rectangle
 
ovalWidthWord — INTEGER; width, in pixels, of oval defining rounded corners
ovalHeightWord — INTEGER; height, in pixels, of oval defining rounded corners
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void InvertRRect(rectPtr,ovalWidth,ovalHeight) 
Docs

2️⃣




$6104

FillRRect

Fills the interior of a specified round rectangle with a specified pen pattern

Parameters
Stack before call
previous contents
rectPtr Long — POINTER to RECT defining enclosing rectangle
 
ovalWidthWord — INTEGER; width, in pixels, of oval defining rounded corners
ovalHeightWord — INTEGER; height, in pixels, of oval defining rounded corners
patternPtr Long — POINTER to pattern
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void FillRRect(rectPtr,ovalWidth,ovalHeight,patternPtr) 
Docs

2️⃣




$6204

FrameArc

Draws the frame of a specified arc using the current pen mode, pattern, & size

Parameters
Stack before call
previous contents
rectPtr Long — POINTER to RECT defining enclosing rectangle
 
startAngleWord — INTEGER; starting angle in degrees
arcAngleWord — INTEGER; arc angle in degrees
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void FrameArc(rectPtr,startAngle,arcAngle) 
Docs

2️⃣




$6304

PaintArc

Paints the interior of specified arc using the current pen mode & pattern

Parameters
Stack before call
previous contents
rectPtr Long — POINTER to RECT defining enclosing rectangle
 
startAngleWord — INTEGER; starting angle in degrees
arcAngleWord — INTEGER; arc angle in degrees
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void PaintArc(rectPtr,startAngle,arcAngle) 
Docs

2️⃣




$6404

EraseArc

Erases the interior of a specified arc by filling it in with the backround pattern

Parameters
Stack before call
previous contents
rectPtr Long — POINTER to RECT defining enclosing rectangle
 
startAngleWord — INTEGER; starting angle in degrees
arcAngleWord — INTEGER; arc angle in degrees
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void EraseArc(rectPtr,startAngle,arcAngle) 
Docs

2️⃣




$6504

InvertArc

Inverts the pixels in the interior of a specified arc

Parameters
Stack before call
previous contents
rectPtr Long — POINTER to RECT defining enclosing rectangle
 
startAngleWord — INTEGER; starting angle in degrees
arcAngleWord — INTEGER; arc angle in degrees
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void InvertArc(rectPtr,startAngle,arcAngle) 
Docs

2️⃣




$6604

FillArc

Fills the interior of a specified arc with a specified pen pattern

Parameters
Stack before call
previous contents
rectPtr Long — POINTER to RECT defining enclosing rectangle
 
startAngleWord — INTEGER; starting angle in degrees
arcAngleWord — INTEGER; arc angle in degrees
patternPtr Long — POINTER to pattern
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void FillArc(rectPtr,startAngle,arcAngle,patternPtr) 
Docs

2️⃣




$6704

NewRgn

Allocates space for a new region & initializes it to empty - only way to create new region

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
rgnHandle Long — HANDLE to new region
 
SP
Errors
Memory Manager errors            Returned unchanged
C
extern pascal RgnHandle NewRgn() 
Docs

2️⃣




$6804

DisposeRgn

Deallocates the memory for a specified region

Parameters
Stack before call
previous contents
rgnHandle Long — HANDLE of region being disposed
 
SP
Stack after call
previous contents
SP
Errors
Memory Manager errors            Returned unchanged
C
extern pascal void DisposeRgn(rgnHandle) 
Docs

2️⃣




$6904

CopyRgn

Copies the region definition from one region to another

Parameters
Stack before call
previous contents
srcRgnHandle Long — HANDLE to source region
 
destRgnHandle Long — HANDLE to destination region
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void CopyRgn(srcRgnHandle,destRgnHandle) 
Docs

2️⃣




$6A04

SetEmptyRgn

Destroys previous region information by setting a specified region to an empty region

Parameters
Stack before call
previous contents
rgnHandle Long — HANDLE to region being modified
 
SP
Stack after call
previous contents
SP
Errors
Memory Manager errors            Returned unchanged
C
extern pascal void SetEmptyRgn(rgnHandle) 
Docs

2️⃣




$6B04

SetRectRgn

Destroys previous region information by setting a specified region to a specified rectangle

Parameters
Stack before call
previous contents
rgnHandle Long — HANDLE to region being set
 
leftWord — INTEGER; left X coordinate for rectangle
topWord — INTEGER; top Y coordinate for rectangle
rightWord — INTEGER; right X coordinate for rectangle
bottomWord — INTEGER; bottom Y coordinate for rectangle
SP
Stack after call
previous contents
SP
Errors
Memory Manager errors            Returned unchanged
C
extern pascal void SetRectRgn(rgnHandle,left,top,right,bottom) 
Docs

2️⃣




$6C04

RectRgn

Destroys previous region information by setting a specified region to a specified rectangle

Parameters
Stack before call
previous contents
rgnHandle Long — HANDLE to region being set
 
rectPtr Long — POINTER to RECT defining rectangle used as source
 
SP
Stack after call
previous contents
SP
Errors
Memory Manager errors            Returned unchanged
C
extern pascal void RectRgn(rgnHandle,rectPtr) 
Docs

2️⃣




$6D04

OpenRgn

Allocates temp space & starts saving lines & framed shapes for later processing as a region definition.

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors
$0430    rgnAlreadyOpen          Region already open
Memory Manager errors            Returned unchanged
C
extern pascal void openRgn() 
Docs

2️⃣




$6E04

CloseRgn

Completes the region definition process started by an OpenRgn call

Parameters
Stack before call
previous contents
rgnHandle Long — HANDLE to region being set to a collection of points
 
SP
Stack after call
previous contents
SP
Errors
$0431    rgnNotOpen              Region not open
Memory Manager errors            Returned unchanged
C
extern pascal void CloseRgn(rgnHandle) 
Docs

2️⃣




$6F04

OffsetRgn

Moves a region on the coordinate plane a specified distance

Parameters
Stack before call
previous contents
rgnHandle Long — HANDLE to region being offset
 
dHWord — INTEGER; horizontal displacement in pixels
dVWord — INTEGER; vertical displacement in pixels
SP
Stack after call
previous contents
SP
Errors
Memory Manager errors            Returned unchanged
C
extern pascal void OffsetRgn(rgnHandle,dH,dV) 
Docs

2️⃣




$7004

InsetRgn

Shrinks or expands a specified region

Parameters
Stack before call
previous contents
rgnHandle Long — HANDLE to region being inset
 
dHWord — INTEGER; horizontal displacement in pixels
dVWord — INTEGER; vertical displacement in pixels
SP
Stack after call
previous contents
SP
Errors
Memory Manager errors            Returned unchanged
C
extern pascal void InsetRgn(rgnHandle,dH,dV) 
Docs

2️⃣




$7104

SectRgn

Calculates intersection of two regions & places intersection in a destination region

Parameters
Stack before call
previous contents
rgn1Handle Long — HANDLE to one source region
 
rgn2Handle Long — HANDLE to another source region
 
destRgnHandle Long — HANDLE to destination region
 
SP
Stack after call
previous contents
SP
Errors
Memory Manager errors            Returned unchanged
C
extern pascal void SectRgn(rgn1Handle,rgn2Handle,destRgnHandle) 
Docs

2️⃣




$7204

UnionRgn

Calculates smallest region that contains every point that's in either source region and places result in destination region

Parameters
Stack before call
previous contents
rgn1Handle Long — HANDLE to one source region
 
rgn2Handle Long — HANDLE to another source region
 
unionRgnHandle Long — HANDLE to destination region
 
SP
Stack after call
previous contents
SP
Errors
Memory Manager errors            Returned unchanged
C
extern pascal void UnionRgn(rgn1Handle,rgn2Handle,unionRgnHandle) 
Docs

2️⃣




$7304

DiffRgn

Calculates the difference of two regions and places difference in a destination region

Parameters
Stack before call
previous contents
rgn1Handle Long — HANDLE to one source region
 
rgn2Handle Long — HANDLE to another source region
 
diffRgnHandle Long — HANDLE to destination region
 
SP
Stack after call
previous contents
SP
Errors
Memory Manager errors            Returned unchanged
C
extern pascal void DiffRgn(rgn1Handle,rgn2Handle,diffRgnHandle) 
Docs

2️⃣




$7404

XorRgn

Calculates the difference between the union and the intersection of two regions and places result in a destination region

Parameters
Stack before call
previous contents
rgn1Handle Long — HANDLE to one source region
 
rgn2Handle Long — HANDLE to another source region
 
xorRgnHandle Long — HANDLE to destination region
 
SP
Stack after call
previous contents
SP
Errors
Memory Manager errors            Returned unchanged
C
extern pascal void XorRgn(rgn1Handle,rgn2Handle,xorRgnHandle) 
Docs

2️⃣




$7504

PtInRgn

Checks to see whether the pixel below & to right of a specified point1 is within a specified region

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
pointPtr Long — POINTER to POINT
 
rgnHandle Long — HANDLE to region
 
SP
Stack after call
previous contents
pixelFlagWord — BOOLEAN; TRUE if pixel in region, FALSE if not
SP
Errors
Memory Manager errors            Returned unchanged
C
extern pascal Boolean PtInRgn(pointPtr,rgnHandle) 
Docs

2️⃣




$7604

RectInRgn

Checks whether a specified rectangle intersects a specified region

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
rectPtr Long — POINTER to RECT defining rectangle
 
rgnHandle Long — HANDLE to region
 
SP
Stack after call
previous contents
encloseFlagWord — BOOLEAN; TRUE if intersection encloses at least a pixel, FALSE if not
SP
Errors
Memory Manager errors            Returned unchanged
C
extern pascal Boolean RectInRgn(rectPtr,rgnHandle) 
Docs

2️⃣




$7704

EqualRgn

Indicates whether two regions are equal

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
rgn1Handle Long — HANDLE to one region
 
rgn2Handle Long — HANDLE to other region
 
SP
Stack after call
previous contents
equalFlagWord — BOOLEAN; TRUE if regions are equal, FALSE if not
SP
Errors
Memory Manager errors            Returned unchanged
C
extern pascal Boolean EqualRgn(rgn1Handle,rgn2Handle) 
Docs

2️⃣




$7804

EmptyRgn

Indicates whether a specified region is empty

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
rgnHandle Long — HANDLE to region
 
SP
Stack after call
previous contents
emptyFlagWord — BOOLEAN; TRUE if regions is empty, FALSE if not
SP
Errors

None

C
extern pascal Boolean EmptyRgn(rgnHandle) 
Docs

2️⃣




$7904

FrameRgn

Draws the frame of a specified region using current pen mode, pattern & size

Parameters
Stack before call
previous contents
rgnHandle Long — HANDLE to region
 
SP
Stack after call
previous contents
SP
Errors
Memory Manager errors            Returned unchanged
C
extern pascal void FrameRgn(rgnHandle) 
Docs

2️⃣




$7A04

PaintRgn

Paints the interior of a specified region using the current pen mode & pattern

Parameters
Stack before call
previous contents
rgnHandle Long — HANDLE to region
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void PaintRgn(rgnHandle) 
Docs

2️⃣




$7B04

EraseRgn

Erases the interior of a specified region by filling it with the background pattern

Parameters
Stack before call
previous contents
rgnHandle Long — HANDLE to region
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void EraseRgn(rgnHandle) 
Docs

2️⃣




$7C04

InvertRgn

Inverts the pixels in the interior of a specified region

Parameters
Stack before call
previous contents
rgnHandle Long — HANDLE to region
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void InvertRgn(rgnHandle) 
Docs

2️⃣




$7D04

FillRgn

Fills the interior of a specified region with a specified pen pattern

Parameters
Stack before call
previous contents
rgnHandle Long — HANDLE to region
 
patternPtr Long — POINTER to pattern
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void FillRgn(rgnHandle,patternPtr) 
Docs

2️⃣




$7E04

ScrollRect

Shifts pixels inside intersect of specified rect, visble region, clip region, port rect, and bounds rect

Parameters
Stack before call
previous contents
rectPtr Long — POINTER to RECT defining rectangle
 
dHWord — INTEGER; horizontal distance to scroll in pixels
dVWord — INTEGER; vertical distance to scroll in pixels
updateRgnHandle Long — HANDLE to region
 
SP
Stack after call
previous contents
SP
Errors
Memory Manager errors            Returned unchanged
C
extern pascal void ScrollRect(rectPtr,dH,dV,updateRgnHandle) 
Docs

2️⃣




$7F04

PaintPixels

Transfers a region of pixels

Parameters
Stack before call
previous contents
paintParamPtr Long — POINTER to parameter block (see Toolbox Ref Vol2, Table 16-35)
 
SP
Stack after call
previous contents
SP
Errors
$0420    notEqualChunkiness      Chunkiness not equal
C
extern pascal void PaintPixels(paintParamPtr) 
Docs

2️⃣




$8004

AddPt

Adds two specified points together and leaves result in destination point

Parameters
Stack before call
previous contents
srcPtPtr Long — POINTER to POINT
 
destPtPtr Long — POINTER to POINT used as source and destination
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void AddPt(srcPtPtr,destPtPtr) 
Docs

2️⃣




$8104

SubPt

Subtracts source point from destination point and leaves result in the destination point

Parameters
Stack before call
previous contents
srcPtPtr Long — POINTER to POINT
 
destPtPtr Long — POINTER to POINT used as source and destination
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SubPt(srcPtPtr,destPtPtr) 
Docs

2️⃣




$8204

SetPt

Sets a point to specified horizontal and vertical values

Parameters
Stack before call
previous contents
srcPtPtr Long — POINTER to POINT
 
hWord — INTEGER; horizontal value of point
vWord — INTEGER; vertical value of point
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetPt(srcPtPtr,h,v) 
Docs

2️⃣




$8304

EqualPt

Indicates whether two points are equal

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
point1Ptr Long — POINTER to first POINT
 
point2Ptr Long — POINTER to second POINT
 
SP
Stack after call
previous contents
equalFlagWord — BOOLEAN; TRUE if points are equal, FALSE if not
SP
Errors

None

C
extern pascal Boolean EqualPt(point1Ptr,point2Ptr) 
Docs

2️⃣




$8404

LocalToGlobal

Converts a point from local coordinates to global coordinates

Parameters
Stack before call
previous contents
point1Ptr Long — POINTER to POINT to be converted
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void LocalToGlobal(pointPtr) 
Docs

2️⃣




$8504

GlobalToLocal

Converts a point from global coordinates to local coordinates

Parameters
Stack before call
previous contents
pointPtr Long — POINTER to POINT to be converted
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void GlobalToLocal(pointPtr) 
Docs

2️⃣




$8604

Random

Returns a pseudorandom number in the range -32768 to 32767

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal Integer Random() 
Docs

2️⃣




$8704

SetRandSeed

Sets the seed value for the random number generator

Parameters
Stack before call
previous contents
randomSeed Long — LONGINT; seed value
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetRandSeed(randomSeed) 
Docs

2️⃣




$8804

GetPixel

Returns the pixel below and to the right of a specified point

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
hWord — Horizontal value of point, in global coordinates
vWord — Vertical value of point, in global coordinates
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal Word GetPixel(h,v) 
Docs

2️⃣




$8904

ScalePt

Scales a specified point from a source rectangle to a destination rectangle

Parameters
Stack before call
previous contents
pointPtr Long — POINTER to POINT to be scaled
 
srcRectPtr Long — POINTER to RECT defining source rectangle
 
destRectPtr Long — POINTER to RECT defining destination rectangle
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void ScalePt(pointPtr,srcRectPtr,destRectPtr) 
Docs

2️⃣




$8A04

MapPt

Maps a specified point from a source rectangle to a destination rectangle

Parameters
Stack before call
previous contents
pointPtr Long — POINTER to POINT
 
srcRectPtr Long — POINTER to RECT defining source rectangle
 
destRectPtr Long — POINTER to RECT defining destination rectangle
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void MapPt(pointPtr,srcRectPtr,destRectPtr) 
Docs

2️⃣




$8B04

MapRect

Maps a specified rectangle from a source rectangle to a destination rectangle

Parameters
Stack before call
previous contents
pointPtr Long — POINTER to RECT defining rectangle to be mapped
 
srcRectPtr Long — POINTER to RECT defining source rectangle
 
destRectPtr Long — POINTER to RECT defining destination rectangle
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void MapRect(rectPtr,srcRectPtr,destRectPtr) 
Docs

2️⃣




$8C04

MapRgn

Maps a specified region from a source rectangle to a destination rectangle

Parameters
Stack before call
previous contents
mapRgnHandle Long — HANDLE to region to be mapped
 
srcRectPtr Long — POINTER to RECT defining source rectangle
 
destRectPtr Long — POINTER to RECT defining destination rectangle
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void MapRgn(mapRgnHandle,srcRectPtr,destRectPtr) 
Docs

2️⃣




$8D04

SetStdProcs

Sets up a specified record of pointers for customizing QuickDraw II operations

Parameters
Stack before call
previous contents
stdProcRecPtr Long — POINTER to stdProcs record
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetStdProcs(stdProcRecPtr) 
Docs

2️⃣




$8E04

SetCursor

Sets the cursor to an image passed in a specified cursor record

Parameters
Stack before call
previous contents
cursorPtr Long — POINTER to cursor record
 
SP
Stack after call
previous contents
SP
Errors
Memory Manager errors            Returned unchanged
C
extern pascal void SetCursor(cursorPtr) 
Docs

2️⃣




$8F04

GetCursorAdr

Returns a pointer to the current cursor record

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
cursorPtr Long — POINTER to current cursor record
 
SP
Errors

None

C
extern pascal Pointer GetCursorAdr() 
Docs

2️⃣




$9004

HideCursor

Hides the cursor by decrementing the cursor level

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void HideCursor() 
Docs

2️⃣




$9104

ShowCursor

Shows the cursor by incrementing the cursor level

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void ShowCursor() 
Docs

2️⃣




$9204

ObscureCursor

Hides the cursor until the mouse moves

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void ObscureCursor() 
Docs

2️⃣




$9404

SetFont

Sets the current font to a specified font

Parameters
Stack before call
previous contents
newFontHandle Long — HANDLE to font
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetFont(newFontHandle) 
Docs

2️⃣




$9504

GetFont

Returns a handle to the current font

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
fontHandle Long — HANDLE to font
 
SP
Errors

None

C
extern pascal FontHndl GetFont() 
Docs

2️⃣




$9604

GetFontInfo

Returns information about the current font in a specified record

Parameters
Stack before call
previous contents
fontInfoRecPtr Long — POINTER to space for fontInfo record
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void GetFontInfo(fontInfoRecPtr) 
Docs

2️⃣




$9704

GetFontGlobals

Returns information about the current font in a specified record

Parameters
Stack before call
previous contents
fgRecPtr Long — POINTER to space for font globals record
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void GetFontGlobals(fgRecPtr) 
Docs

2️⃣




$9804

SetFontFlags

Sets the font flags word to a specified value

Parameters
Stack before call
previous contents
fontFlagsWord — INTEGER; font flags (see Toolbox Ref Vol2 Figure 16-37)
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetFontFlags(fontFlags) 
Docs

2️⃣




$9904

GetFontFlags

Returns the current font flags word

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
fontFlagsWord — INTEGER; font flags (see Toolbox Ref Vol2 Figure 16-37)
SP
Errors

None

C
extern pascal Word GetFontFlags() 
Docs

2️⃣




$9A04

SetTextFace

Sets the text face to a specified value

Parameters
Stack before call
previous contents
textFaceWord — INTEGER; text face (see Toolbox Ref Vol2 Figure 16-39)
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetTextFace(textFace) 
Docs

2️⃣




$9B04

GetTextFace

Returns the current text face

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
textFaceWord — INTEGER; text face (see Toolbox Ref Vol2 Figure 16-39)
SP
Errors

None

C
extern pascal TextStyle GetTextFace() 
Docs

2️⃣




$9C04

SetTextMode

Sets the text mode to a specified value

Parameters
Stack before call
previous contents
textModeWord — INTEGER; text mode (see Toolbox Ref Vol2 Table 16-10)
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetTextMode(textMode) 
Docs

2️⃣




$9D04

GetTextMode

Returns the current text mode

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
textModeWord — INTEGER; text mode (see Toolbox Ref Vol2 Table 16-10)
SP
Errors

None

C
extern pascal Word GetTextMode() 
Docs

2️⃣




$9E04

SetSpaceExtra

Sets the spExtra field in the GrafPort to a specified value

Parameters
Stack before call
previous contents
spaceExtra Long — FIXED; new value for spExtra field
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetSpaceExtra(spaceExtra) 
Docs

2️⃣




$9F04

GetSpaceExtra

Returns the value of the spExtra field from the GrafPort

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
spaceExtra Long — FIXED; value of spExtra field
 
SP
Errors

None

C
extern pascal Fixed GetSpaceExtra() 
Docs

2️⃣




$A004

SetForeColor

Sets the fgColor field (foreground color) in the GrafPort to a specified value

Parameters
Stack before call
previous contents
foreColorWord — INTEGER; foreground color
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetForeColor(foreColor) 
Docs

2️⃣




$A104

GetForeColor

Returns the value of the current fgColor field (foreground color) from the GrafPort

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
foreColorWord — INTEGER; value of fgColor field
SP
Errors

None

C
extern pascal Word GetForeColor() 
Docs

2️⃣




$A204

SetBackColor

Sets the bgColor field (background color) in the GrafPort to a specified value

Parameters
Stack before call
previous contents
backColorWord — INTEGER; background color
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetBackColor(backColor) 
Docs

2️⃣




$A304

GetBackColor

Returns the value of the current bgColor field (background color) from the GrafPort

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
backColorWord — INTEGER; value of bgColor field
SP
Errors

None

C
extern pascal Word GetBackColor() 
Docs

2️⃣




$A404

DrawChar

Draws a specified character at current pen location and updates pen location

Parameters
Stack before call
previous contents
theCharWord — ASCII code of character to be drawn (0-255)
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void DrawChar(theChar) 
Docs

2️⃣




$A504

DrawString

Draws a specified Pascal-type string at the current pen location and updates the pen location.

Parameters
Stack before call
previous contents
stringPtr Long — POINTER to Pascal-type string to be drawn
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void DrawString(stringPtr) 
Docs

2️⃣




$A604

DrawCString

Draws a specified C string at the current pen location and updates the pen location

Parameters
Stack before call
previous contents
cStringPtr Long — POINTER to C string to be drawn
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void DrawCString(cStringPtr) 
Docs

2️⃣




$A704

DrawText

Draws specified text at the current pen location and updates pen location

Parameters
Stack before call
previous contents
textPtr Long — POINTER to text to be drawn
 
textLengthWord — INTEGER; number of bytes in text to be drawn
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void DrawText(textPtr,textLength) 
Docs

2️⃣




$A804

CharWidth

Returns the character width, in pixels (pen displacement), of a specified character

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
theCharWord — Character to be measured
SP
Stack after call
previous contents
charWidthWord — INTEGER; width of character in pixels
SP
Errors

None

C
extern pascal Integer CharWidth(theChar) 
Docs

2️⃣




$A904

StringWidth

Returns sum of all char widths, in pixels (pen displacements), of specified Pascal-type string.

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
stringPtr Long — POINTER to Pascal-type string
 
SP
Stack after call
previous contents
stringWidthWord — INTEGER; width of string in pixels
SP
Errors

None

C
extern pascal Integer StringWidth(stringPtr) 
Docs

2️⃣




$AA04

CStringWidth

Returns sum of all char widths, in pixels (pen displacements), of specified C string

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
cStringPtr Long — POINTER to C string
 
SP
Stack after call
previous contents
cStringWidthWord — INTEGER; width of C string in pixels
SP
Errors

None

C
extern pascal Integer CStringWidth(cStringPtr) 
Docs

2️⃣




$AB04

TextWidth

Returns the character width, in pixels (pen displacements), of specified text

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
textPtr Long — POINTER to text
 
textLengthWord — INTEGER; length of text in bytes
SP
Stack after call
previous contents
textWidthWord — INTEGER; width of text in pixels
SP
Errors

None

C
extern pascal Integer TextWidth(textPtr,textLength) 
Docs

2️⃣




$AC04

CharBounds

Puts the character bounds rectangle of a specified character into a specified buffer

Parameters
Stack before call
previous contents
theCharWord — Character to use to set bounds
resultPtr Long — POINTER to space for rectangle
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void CharBounds(theChar,resultPtr) 
Docs

2️⃣




$AD04

StringBounds

Puts the character bounds rectangle of a specified Pascal-type string into specified buffer

Parameters
Stack before call
previous contents
stringPtr Long — POINTER to Pascal-type string
 
resultPtr Long — POINTER to space for RECT defining rectangle
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void StringBounds(stringPtr,resultPtr) 
Docs

2️⃣




$AE04

CStringBounds

Puts char bounds rectangle of a specified C string into a specified buffer

Parameters
Stack before call
previous contents
cStringPtr Long — POINTER to C string
 
resultPtr Long — POINTER to space for RECT defining rectangle
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void CStringBounds(cStringPtr,resultPtr) 
Docs

2️⃣




$AF04

TextBounds

Puts the character bounds rectangle of specified text into a specified buffer

Parameters
Stack before call
previous contents
textPtr Long — POINTER to text
 
textLength Long — INTEGER; length of text in bytes
 
resultPtr Long — POINTER to space for RECT defining rectangle
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void TextBounds(textPtr,textLength,resultPtr) 
Docs

2️⃣




$B004

SetArcRot

Sets the arcRot field in the GrafPort to a specified value

Parameters
Stack before call
previous contents
arcRotValueWord — INTEGER; new value of arcRot field
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void setArcRot(arcRotValue) 
Docs

2️⃣




$B104

GetArcRot

Returns the value of the arcRot field in the current GrafPort

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
arcRotWord — INTEGER; value of arcRot field
SP
Errors

None

C
extern pascal Integer getArcRot() 
Docs

2️⃣




$B204

SetSysFont

Sets a specified font as the system font

Parameters
Stack before call
previous contents
fontHandle Long — HANDLE to font that will be system font
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void setSysFont(fontHandle) 
Docs

2️⃣




$B304

GetSysFont

Returns a handle to the current system font

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
fontHandle Long — HANDLE to current system font
 
SP
Errors

None

C
extern pascal FontHndl GetSysFont() 
Docs

2️⃣




$B404

SetVisRgn

Copies specified region into the visible region (but does not change the visRgn field of the GrafPort).

Parameters
Stack before call
previous contents
rgnHandle Long — HANDLE to region
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetVisRgn(rgnHandle) 
Docs

2️⃣




$B504

GetVisRgn

Copies the contents of the visible region into a specified region. The region must have already been created with a NewRgn call.

Parameters
Stack before call
previous contents
rgnHandle Long — HANDLE to region
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void GetVisRgn(rgnHandle) 
Docs

2️⃣




$B604

SetIntUse

Indicates to the cursor drawing code whether the code should use scan line interrupts.

Parameters
Stack before call
previous contents
useIntWord — BOOLEAN; TRUE for cursor to use scan line interrupts, FALSE if not
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetIntUse(useInt) 
Docs

2️⃣ 📕




$B704

OpenPicture

Allocates memory for the recording of drawing commands into a picture definition, and returns a handle to the picture.

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
picFrame Long — POINTER to RECT defining picture frame
 
SP
Stack after call
previous contents
picHandle Long — Handle to picture
 
SP
Errors

None

C
extern pascal Handle OpenPicture(picFrame) 
Docs

2️⃣




$B804

PicComment

Inserts a specified comment into the currently open picture.

Parameters
Stack before call
previous contents
commentKindWord — Type of comment
dataSizeWord — Size of additional data; 0 if none
dataHandle Long — Handle to additional data; NIL if none
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void PicComment(commentKind,dataSize,dataHandle) 
Docs

2️⃣




$B904

ClosePicture

Completes the picture definition process begun by OpenPicture call.

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void ClosePicture 
Docs

2️⃣




$BA04

DrawPicture

Takes drawing commands recorded in pic definition, maps them from picture frame into destination rectangle, and draws them.

Parameters
Stack before call
previous contents
picHandle Long — Handle to picture
 
destRect Long — POINTER to RECT defining destination rectangle
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void DrawPicture(picHandle,destRect) 
Docs

2️⃣




$BB04

KillPicture

Releases all memory occupied by a specifed picture.

Parameters
Stack before call
previous contents
picHandle Long — Handle to picture
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void KillPicture(picHandle) 
Docs

2️⃣




$BC04

FramePoly

Draws the frame of a specified polygon using the current pen mode, pattern, & size. Poly is framed with a series of LineTo calls.

Parameters
Stack before call
previous contents
polyHandle Long — Handle to polygon
 
SP
Stack after call
previous contents
SP
Errors
Memory Manager errors            Returned unchanged
C
extern pascal void FramePoly(polyHandle) 
Docs

2️⃣




$BD04

PaintPoly

Paints the interior of a specified polygon using the current pen mode & pattern.

Parameters
Stack before call
previous contents
polyHandle Long — Handle to polygon
 
SP
Stack after call
previous contents
SP
Errors
Memory Manager errors            Returned unchanged
C
extern pascal void PaintPoly(polyHandle) 
Docs

2️⃣




$BE04

ErasePoly

Erases the interior of a specified polygon by filling it with the background pattern

Parameters
Stack before call
previous contents
polyHandle Long — Handle to polygon
 
SP
Stack after call
previous contents
SP
Errors
Memory Manager errors            Returned unchanged
C
extern pascal void ErasePoly(polyHandle) 
Docs

2️⃣




$BF04

InvertPoly

Inverts the pixels in the interior of a specified polygon.

Parameters
Stack before call
previous contents
polyHandle Long — Handle to polygon
 
SP
Stack after call
previous contents
SP
Errors
Memory Manager errors            Returned unchanged
C
extern pascal void InvertPoly(polyHandle) 
Docs

2️⃣




$C004

FillPoly

Fills the interior of a specified polygon with a specified pen pattern.

Parameters
Stack before call
previous contents
polyHandle Long — Handle to polygon
 
patternPtr Long — POINTER to pattern
 
SP
Stack after call
previous contents
SP
Errors
Memory Manager errors            Returned unchanged
C
extern pascal void FillPoly(polyHandle,patternPtr) 
Docs

2️⃣




$C104

OpenPoly

Returns a handle to a polygon data structure that will be updated by future LineTo calls.

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
polyHandle Long — Handle to polygon
 
SP
Errors
$0440    polyAlreadyOpen         Polygon already open
C
extern pascal Handle OpenPoly() 
Docs

2️⃣




$C204

ClosePoly

Completes the polygon definition process started with an OpenPoly call.

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors
$0441    polyNotOpen             No polygon open in current GrafPort
Memory Manager errors            Returned unchanged
C
extern pascal void ClosePoly() 
Docs

2️⃣




$C304

KillPoly

Disposes of a specified polygon.

Parameters
Stack before call
previous contents
polyHandle Long — Handle to polygon to be killed
 
SP
Stack after call
previous contents
SP
Errors
Memory Manager errors            Returned unchanged
C
extern pascal void KillPoly() 
Docs

2️⃣




$C404

OffsetPoly

Offsets a specified polygon by specified horizontal & vertical displacements.

Parameters
Stack before call
previous contents
polyHandle Long — Handle to polygon
 
dHWord — INTEGER; horizontal displacement in pixels
dVWord — INTEGER; vertical displacement in pixels
SP
Stack after call
previous contents
SP
Errors
Memory Manager errors            Returned unchanged
C
extern pascal void OffsetPoly(polyHandle,dH,dV) 
Docs

2️⃣




$C504

MapPoly

Maps a specified polygon from a source rectangle to a destination rectangle

Parameters
Stack before call
previous contents
polyHandle Long — Handle to polygon to be mapped
 
srcRectPtr Long — POINTER to RECT defining source rectangle
 
destRectPtr Long — POINTER to RECT defining destination rectangle
 
SP
Stack after call
previous contents
SP
Errors
Memory Manager errors            Returned unchanged
C
extern pascal void MapPoly(polyHandle,srcRectPtr,destRectPtr) 
Docs

2️⃣




$C604

SetClipHandle

Sets the clipRgn handle field in the GrafPort to a specified value.

Parameters
Stack before call
previous contents
rgnHandle Long — Handle to clipping region
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetClipHandle(rgnHandle) 
Docs

2️⃣




$C704

GetClipHandle

Returns a copy of the handle to the clipping region.

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
rgnHandle Long — Handle to clipping region
 
SP
Errors

None

C
extern pascal RgnHandle GetClipHandle() 
Docs

2️⃣




$C804

SetVisHandle

Sets the visRgn field in the GrafPort to a specified value.

Parameters
Stack before call
previous contents
rgnHandle Long — HANDLE to visible region
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetVisHandle(rgnHandle) 
Docs

2️⃣




$C904

GetVisHandle

Returns a copy of the handle to the visible region.

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
visRgnHandle Long — HANDLE to region
 
SP
Errors

None

C
extern pascal RgnHandle GetVisHandle() 
Docs

2️⃣




$CA04

InitCursor

Reinitializes the cursor. The cursor is set to the arrow cursor and made visible.

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void InitCursor() 
Docs

2️⃣




$CB04

SetBufDims

Sets size of QD II clipping and text buffers, padding to allow mods to chExtra & spExtra

Parameters
Stack before call
previous contents
maxWidthWord — INTEGER; width, in bytes, of widest pixel image to be used
maxFontHeightWord — INTEGER; height, in pixels, of tallest font application will use
maxFBRExtentWord — INTEGER; greatest fbrExtent, in pixels, of any font to be used
SP
Stack after call
previous contents
SP
Errors
Memory Manager errors            Returned unchanged
C
extern pascal void SetBufDims(maxWidth,maxFontHeight,maxFBRExtent) 
Docs

2️⃣




$CC04

ForceBufDims

Sets size of QD II clipping and text buffers, but doesn't pad maxFBRExtent in any way.

Parameters
Stack before call
previous contents
maxWidthWord — INTEGER; width, in bytes, of widest pixel image to be used
maxFontHeightWord — INTEGER; height, in pixels, of tallest font application will use
maxFBRExtentWord — INTEGER; greatest fbrExtent, in pixels, of any font to be used
SP
Stack after call
previous contents
SP
Errors
Memory Manager errors            Returned unchanged
C
extern pascal void ForceBufDims(maxWidth,maxFontHeight,maxFBRExtent) 
Docs

2️⃣




$CD04

SaveBufDims

Saves QD II's buffer-sizing information in eight-byte record.

Parameters
Stack before call
previous contents
sizeInfoPtr Long — POINTER to space for record (see Toolbox Ref Vol2 Figure 16-36)
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SaveBufDims(sizeInfoPtr) 
Docs

2️⃣




$CE04

RestoreBufDims

Restores QD II's internal buffers to sizes described in an 8-byte record created by SaveBufDims

Parameters
Stack before call
previous contents
sizeInfoPtr Long — POINTER to record to be restored
 
SP
Stack after call
previous contents
SP
Errors
Memory Manager errors            Returned unchanged
C
extern pascal void RestoreBufDims(sizeInfoPtr) 
Docs

2️⃣




$CF04

GetFGSize

Returns the size of the font globals record.

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
fgSizeWord — INTEGER; size of font globals record
SP
Errors

None

C
extern pascal Word GetFGSize() 
Docs

2️⃣




$D004

SetFontID

Sets the fontID field in the GrafPort.

Parameters
Stack before call
previous contents
fontID Long — Font ID
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetFontID(fontID) 
Docs

2️⃣




$D104

GetFontID

Returns the fontID field of the GrafPort.

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
fontID Long — Value of fontID field in GrafPort
 
SP
Errors

None

C
extern pascal LongWord GetFontID() 
Docs

2️⃣




$D204

SetTextSize

Sets the txSize field of the GrafPort to a specified value.

Parameters
Stack before call
previous contents
textSizeWord — INTEGER; value for txSize field
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetTextSize(textSize) 
Docs

2️⃣




$D304

GetTextSize

Returns current value of the txSize field of the GrafPort.

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
textSizeWord — Current value of txSize field
SP
Errors

None

C
extern pascal Integer GetTextSize() 
Docs

2️⃣




$D404

SetCharExtra

Sets the chExtra field in the GrafPort to a specified value.

Parameters
Stack before call
previous contents
charExtra Long — FIXED; value for chExtra field
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetCharExtra(charExtra) 
Docs

2️⃣




$D504

GetCharExtra

Returns the chExtra field from the GrafPort

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
charExtra Long — FIXED; value of chExtra field
 
SP
Errors

None

C
extern pascal Fixed GetCharExtra() 
Docs

2️⃣




$D604

PPToPort

Transfers pixels from a source pixel map to current port & clips pixels to current visble region & clipping region

Parameters
Stack before call
previous contents
srcLocPtr Long — POINTER to source LocInfo record
 
srcRectPtr Long — POINTER to RECT defining source rectangle
 
destXWord — INTEGER; X coordinate of upper left corner of destination
destYWord — INTEGER; Y coordinate of upper left corner of destination
transferModeWord — Same as pen mode (see Toolbox Ref Vol2, Table 16-9)
SP
Stack after call
previous contents
SP
Errors
$0420    notEqualChunkiness      Chunkiness not equal
C
extern pascal void PPToPort(srcLocPtr,srcRectPtr,destX,destY,transferMode) 
Docs

2️⃣




$D704

InflateTextBuffer

Ensures that the text buffer is big enough to handle a font with the specified width and height, increasing it if necessary.

Parameters
Stack before call
previous contents
newWidthWord — INTEGER; width of font
newHeightWord — INTEGER; height of font
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void InflateTextBuffer(newWidth,newHeight) 
Docs

2️⃣




$D804

GetROMFont

Fills a specified buffer with information about the font in ROM

Parameters
Stack before call
previous contents
recordPtr Long — POINTER to space for ROM font record (see Toolbox Ref Vol2 Figure 16-33)
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void GetROMFont(recordPtr) 
Docs

2️⃣




$D904

GetFontLore

Returns info, up to a specified number of bytes, about the current font in a specified buffer

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
recordPtr Long — POINTER to space for record
 
recordSizeWord — Maximum number of bytes to transfer
SP
Stack after call
previous contents
numBytesXferWord — INTEGER; number of bytes tranferred
SP
Errors

None

C
extern pascal word GetFontLore(recordPtr,recordSize) 
Docs

2️⃣




$DA04

Get640Colors

Returns a pointer to a 512-byte table of 32 $00s, 32 $11s, ..., 32 $FFs, to be used as solid pen patterns.

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
tablePtr Long — POINTER to pattern table
 
SP
Errors

None

C
extern pascal Pointer Get640Colors() 
Docs

📕




$DB05

Set640Color

Sets the current grafport's pen pattern to any of the 16 "solid" 640-mode dithered colors

Parameters
Stack before call
previous contents
colorNumWord — Color number
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void Set640Color(colorNum) 
Docs

📕








Desk Manager




Desk Manager Calls
Routine#Description
DeskBootInit$0105Initializes the Desk Manager; called only by Tool Locator (not by application)
DeskStartUp$0205Starts up the Desk Manager for use by an application
DeskShutDown$0305Shuts down the Desk Manager when an application quits
DeskVersion$0405Returns the version number of the Desk Manager
DeskReset$0505Resets the Desk Manager; called only on reset - not by application
DeskStatus$0605Indicates whether the Desk Manager is active
SaveScrn$0905Saves the 80-column text screens in banks $00, $01, $E0, & $E1 - not called by application
RestScrn$0A05Restores the screen area saved by the Desk Manager - not called by application
SaveAll$0B05Saves all variables that Desk Manager preserves when CDA menu is activated - not called by application
RestAll$0C05Restores all variables that Desk Manager preserves when CDA menu is activated - not called by application
InstallNDA$0E05Installs a specified NDA in the system
InstallCDA$0F05Installs a specified CDA in the system
ChooseCDA$1105Activates the Desk Manager and displays the CDA menu - not called by application
SetDAStrPtr$1305Changes the names of the built-in CDAs
GetDAStrPtr$1405Returns the pointer to the names of the built-in CDAs
OpenNDA$1505Opens a specified NDA
CloseNDA$1605Closes a specified NDA
SystemClick$1705Handles mouse-down events in a system (that is, desk accessory) window
SystemEdit$1805Passes standard menu edits to system windows. Valid: 1=undo, 2=cut, 3=copy, 4=paste, 5=clear
SystemTask$1905Causes a desk accessory to perform its periodic action
SystemEvent$1A05Previews all events returned to application & indicates if event was processed by a desk accessory
GetNumNDAs$1B05Returns the total number of NDAs currently installed
CloseNDAByWinPtr$1C05Closes an NDA with a specified window pointer
CloseAllNDAs$1D05Closes all open NDAs
FixAppleMenu$1E05Adds the names of the NDAs to a specified menu
AddToRunQ$1F05Adds the specified routine to the head of the run queue
RemoveFromRunQ$2005Removes the specified run item from the run queue
RemoveCDA$2105Removes the specified CDA from the Desk Manager CDA list (does not dispose of memory used by CDA)
RemoveNDA$2205Removes the specified NDA from the Desk Manager NDA list (does not dispose of memory used by NDA nor rebuild Apple menu)
GetDeskAccInfo$2305Provides safe access to certain information about DAs currently installed in the system
CallDeskAcc$2405Calls a NDA's Action or Init routine with the specified values
GetDeskGlobal$2505GetDeskGlobal retrieves information from the Desk Manager

Desk Manager Calls


$0105

DeskBootInit

Initializes the Desk Manager; called only by Tool Locator (not by application)

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C

Call must not be made by an application.

Docs

1️⃣




$0205

DeskStartUp

Starts up the Desk Manager for use by an application

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void DeskStartUp() 
Docs

1️⃣




$0305

DeskShutDown

Shuts down the Desk Manager when an application quits

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void DeskShutDown() 
Docs

1️⃣




$0405

DeskVersion

Returns the version number of the Desk Manager

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
versionInfoWord — Version number of the Desk Manager
SP
Errors

None

C
extern pascal Word DeskVersion() 
Docs

1️⃣




$0505

DeskReset

Resets the Desk Manager; called only on reset - not by application

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void DeskShutDown() 
Docs

1️⃣




$0605

DeskStatus

Indicates whether the Desk Manager is active

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
activeFlagWord — BOOLEAN; TRUE if Desk Manager is active, FALSE if not
SP
Errors

None

C
extern pascal Boolean DeskStatus() 
Docs

1️⃣




$0905

SaveScrn

Saves the 80-column text screens in banks $00, $01, $E0, & $E1 - not called by application

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C

Call must not be made by an application.

Docs

1️⃣




$0A05

RestScrn

Restores the screen area saved by the Desk Manager - not called by application

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C

Call must not be made by an application.

Docs

1️⃣




$0B05

SaveAll

Saves all variables that Desk Manager preserves when CDA menu is activated - not called by application

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C

Call must not be made by an application.

Docs

1️⃣




$0C05

RestAll

Restores all variables that Desk Manager preserves when CDA menu is activated - not called by application

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C

Call must not be made by an application.

Docs

1️⃣




$0E05

InstallNDA

Installs a specified NDA in the system

Parameters
Stack before call
previous contents
idHandle Long — HANDLE to NDA header section
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void InstallNDA(idHandle) 
Docs

1️⃣




$0F05

InstallCDA

Installs a specified CDA in the system

Parameters
Stack before call
previous contents
idHandle Long — HANDLE to CDA header section
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void InstallCDA(idHandle) 
Docs

1️⃣




$1105

ChooseCDA

Activates the Desk Manager and displays the CDA menu - not called by application

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C

Call must not be made by an application.

Docs

1️⃣




$1305

SetDAStrPtr

Changes the names of the built-in CDAs

Parameters
Stack before call
previous contents
altDispHandle Long — HANDLE to new alternate display desk accessory
 
stringTablePtr Long — POINTER to table of strings
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetDAStrPtr(altDispHandle,stringTablePtr) 
Docs

1️⃣




$1405

GetDAStrPtr

Returns the pointer to the names of the built-in CDAs

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
stringTablePtr Long — POINTER to table of strings for the built-in CDA names
 
SP
Errors

None

C
extern pascal Pointer GetDAStrPtr() 
Docs

1️⃣




$1505

OpenNDA

Opens a specified NDA

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
idNumWord — ID number returned from Menu Manager
SP
Stack after call
previous contents
refNumWord — Reference number to use when apllication closes NDA
SP
Errors
$0510    daNotFound              Specified DA not available
C
extern pascal Word OpenNDA(idNum) 
Docs

1️⃣




$1605

CloseNDA

Closes a specified NDA

Parameters
Stack before call
previous contents
refNumWord — As returned by the OpenNDA routine
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void CloseNDA(refNum) 
Docs

1️⃣




$1705

SystemClick

Handles mouse-down events in a system (that is, desk accessory) window

Parameters
Stack before call
previous contents
eventRecPtr Long — POINTER to event record
 
theWindowPtr Long — POINTER to system window
 
findWndwResultWord — Result of the FindWindow call
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SystemClick(eventRecPtr,theWindowPtr,findWndwResult) 
Docs

1️⃣




$1805

SystemEdit

Passes standard menu edits to system windows. Valid: 1=undo, 2=cut, 3=copy, 4=paste, 5=clear

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
editTypeWord — Edit type
SP
Stack after call
previous contents
processedFlagWord — BOOLEAN; TRUE if frontmost window and DA has to handle call, otherwise FALSE
SP
Errors

None

C
extern pascal Boolean SystemEdit(editType) 
Docs

1️⃣




$1905

SystemTask

Causes a desk accessory to perform its periodic action

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void SystemTask() 
Docs

1️⃣




$1A05

SystemEvent

Previews all events returned to application & indicates if event was processed by a desk accessory

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
eventWhatWord — From event record
eventMessage Long — From event record
 
eventWhen Long — From event record
 
eventWhere Long — From event record
 
eventMods Long — From event record
 
SP
Stack after call
previous contents
processFlagWord — BOOLEAN; TRUE if if event is to be processed by DA, otherwise FALSE - not called by application
SP
Errors

None

C

Call must not be made by an application.

Docs

1️⃣




$1B05

GetNumNDAs

Returns the total number of NDAs currently installed

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
numberofNDAsWord — INTEGER; total number of open NDAs
SP
Errors

None

C
extern pascal unsigned int GetNumNDAs() 
Docs

1️⃣




$1C05

CloseNDAByWinPtr

Closes an NDA with a specified window pointer

Parameters
Stack before call
previous contents
theWindowPtr Long — POINTER to window to close
 
SP
Stack after call
previous contents
SP
Errors
$0510    daNotFound              Specified DA not available
$0511    notSysWindow            The window parameter is not a pointer to a system window owned by an NDA
C
extern pascal void CloseNDAByWinPtr(theWindowPtr) 
Docs

1️⃣




$1D05

CloseAllNDAs

Closes all open NDAs

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void CloseAllNDAs() 
Docs

1️⃣




$1E05

FixAppleMenu

Adds the names of the NDAs to a specified menu

Parameters
Stack before call
previous contents
startingIDWord — ID of menu that will display NDAs
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void FixAppleMenu(startingID) 
Docs

1️⃣




$1F05

AddToRunQ

Adds the specified routine to the head of the run queue

Parameters
Stack before call
previous contents
runItemPtr Long — POINTER to run item to add
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void AddToRunQ(runItemPtr) 
Docs

3️⃣




$2005

RemoveFromRunQ

Removes the specified run item from the run queue

Parameters
Stack before call
previous contents
runItemPtr Long — POINTER to run item to remove
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void RemoveFromRunQ(runItemPtr) 
Docs

3️⃣




$2105

RemoveCDA

Removes the specified CDA from the Desk Manager CDA list (does not dispose of memory used by CDA)

Parameters
Stack before call
previous contents
idHandle Long — HANDLE to CDA header
 
SP
Stack after call
previous contents
SP
Errors
$0510    daNotFound              Specified DA not available
C
extern pascal void RemoveCDA(idHandle) 
Docs

3️⃣




$2205

RemoveNDA

Removes the specified NDA from the Desk Manager NDA list (does not dispose of memory used by NDA nor rebuild Apple menu)

Parameters
Stack before call
previous contents
idHandle Long — HANDLE to NDA header
 
SP
Stack after call
previous contents
SP
Errors
$0510    daNotFound              Specified DA not available
C
extern pascal void RemoveNDA(idHandle) 
Docs

3️⃣




$2305

GetDeskAccInfo

Provides safe access to certain information about DAs currently installed in the system

Parameters
Stack before call
previous contents
flagsWord — Flags
daReference Long — Specifies which desk accessory to get information about
 
buffSizeWord — Size of the result buffer
bufferPtr Long — Pointer to the result buffer
 
SP
Stack after call
previous contents
SP
Errors
$0520    deskBadSelector         Selector out of range
C
extern pascal void GetDeskAccInfo(flags,daReference,buffSize,bufferPtr) 
Docs

📕




$2405

CallDeskAcc

Calls a NDA's Action or Init routine with the specified values

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
flagsWord — Flags
daReference Long — Specifies which desk accessory to call
 
actionWord — Action code to pass to desk accessory
data Long — Data value to pass to desk accessory
 
SP
Stack after call
previous contents
resultWord — Result returned from desk accessory
SP
Errors
$0520    deskBadSelector         Selector out of range
C
extern pascal Word CallDeskAcc(flags,daReference,action,data) 
Docs

📕




$2505

GetDeskGlobal

GetDeskGlobal retrieves information from the Desk Manager

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
selectorWord — Selects which value to retrieve
SP
Stack after call
previous contents
value Long — The selected value
 
SP
Errors
$0520    deskBadSelector         Selector out of range
C
extern pascal Long GetDeskGlobal(selector) 
Docs

📕








Event Manager




Event Manager Calls
Routine#Description
EMBootInit$0106Initializes the Event Manager; called only by Tool Locator - not called by application
EMStartUp$0206Starts up the Event Manager, sets size of event queue, and sets minimum and maximum mouse clamp values.
EMShutDown$0306Shuts down the Event Manager when an application quits
EMVersion$0406Returns the version number of the Event Manager
EMReset$0506Resets the Event Manager; called only on reset - not called by application
EMStatus$0606Indicates whether the Event Manager is active
DoWindows$0906Returns the address of the direct page used by the Event Manager - not called by application
GetNextEvent$0A06Returns next avail event of specified type(s); if event is in queue, GetNextEvent removes it
EventAvail$0B06Allows an application to look at the next available event of a specified type or types.
GetMouse$0C06Returns the current mouse location (in the local coordinate system of the current GrafPort)
Button$0D06Returns the current status of a specified button on the mouse
StillDown$0E06Tests whether the specified mouse button is still down
WaitMouseUp$0F06Tests whether specified mouse button is still down. If not, removes preceding mouse-up event from queue and returns FALSE.
TickCount$1006Returns current number of ticks (in sixtieths of a second) since system was last started
GetDblTime$1106Returns max difference (in ticks) allowed for mouse clicks to be considered a double-click
GetCaretTime$1206Returns time (in ticks) between blicks of caret marking insertion point in text to be edited
SetSwitch$1306Generates a switch event - only switcher-type applications should make this call
PostEvent$1406Posts an event into the event queue
FlushEvents$1506Removes all queue events of type(s) specified by mask up to the first event of type specified by stop mask
GetOSEvent$1606Returns next available queue event of a specified type(s) and removes it from the queue
OSEventAvail$1706Allows application to look at next available queue event of specified type(s), but leaves event in queue
SetEventMask$1806Specifies the system event mask
FakeMouse$1906Allows use of alternative pointing device, like graphics tablet, in place/conjuction of mouse
SetAutoKeyLimit$1A06Controls how repeated keystrokes are inserted into the event queue
GetKeyTranslation$1B06Returns the identifier for the currently selected keystroke translation table
SetKeyTranslation$1C06Sets a new keystroke translation table

Event Manager Calls


$0106

EMBootInit

Initializes the Event Manager; called only by Tool Locator - not called by application

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C

Call must not be made by an application.

Docs

1️⃣




$0206

EMStartUp

Starts up the Event Manager, sets size of event queue, and sets minimum and maximum mouse clamp values.

Parameters
Stack before call
previous contents
dPageAddrWord — Bank $0 starting address for one page of direct-page space
queueSizeWord — Maximum number of event records in queue (0=default of 20)
xMinClampWord — Minimum X clamp value for the mouse
xMaxClampWord — Maximum X clamp value for the mouse
yMinClampWord — Minimum Y clamp value for the mouse
yMaxClampWord — Maximum Y clamp value for the mouse
userIDWord — ID number Event Manager will use to get memory
SP
Stack after call
previous contents
SP
Errors
$0601    emDupStrtUpErr          The Event Manager has already been started
$0606    emQSiz2LrgErr           The size of the event queue is larger than 3639
$0607    emNoMemQueueErr         Insufficient memory for the event queue
C
extern pascal void EMStartUp(dPageAddr,queueSize,xMinClamp,xMaxClamp,yMinClamp,yMaxClamp,userID) 
Docs

1️⃣




$0306

EMShutDown

Shuts down the Event Manager when an application quits

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void EMShutDown() 
Docs

1️⃣




$0406

EMVersion

Returns the version number of the Event Manager

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
versionInfoWord — Version number of the Event Manager
SP
Errors

None

C
extern pascal Word EMVersion() 
Docs

1️⃣




$0506

EMReset

Resets the Event Manager; called only on reset - not called by application

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors
%!s(<nil>)  
C

Call must not be made by an application.

Docs

1️⃣




$0606

EMStatus

Indicates whether the Event Manager is active

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
activeFlagWord — BOOLEAN; TRUE if Event Manager is active, FALSE if not
SP
Errors

None

C
extern pascal Boolean EMStatus() 
Docs

1️⃣




$0906

DoWindows

Returns the address of the direct page used by the Event Manager - not called by application

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
dPageAddrWord — Bank $0 starting address for Event Manager's one-page work area
SP
Errors

None

C

Call must not be made by an application.

Docs

1️⃣




$0A06

GetNextEvent

Returns next avail event of specified type(s); if event is in queue, GetNextEvent removes it

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
eventMaskWord — Specifies which types of events are of interest
eventPtr Long — POINTER to the event record in which event will be placed
 
SP
Stack after call
previous contents
handleEventFlagWord — BOOLEAN; TRUE if even should be handled by application; FALSE if not
SP
Errors

None

C
extern pascal Boolean GetNextEvent(eventMask,eventPtr) 
Docs

1️⃣




$0B06

EventAvail

Allows an application to look at the next available event of a specified type or types.

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
eventMaskWord — Specifies which types of events are of interest
eventPtr Long — POINTER to the event record in which event will be placed
 
SP
Stack after call
previous contents
gotEventFlagWord — BOOLEAN; TRUE if any specified event types available; FALSE if not
SP
Errors

None

C
extern pascal Boolean EventAvail(eventMask,eventPtr) 
Docs

1️⃣




$0C06

GetMouse

Returns the current mouse location (in the local coordinate system of the current GrafPort)

Parameters
Stack before call
previous contents
mouseLocPtr Long — POINTER to POINT for current mouse location
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void GetMouse(mouseLocPtr) 
Docs

1️⃣




$0D06

Button

Returns the current status of a specified button on the mouse

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
buttonNumWord — Number of button (0 or 1) to check
SP
Stack after call
previous contents
buttonDownWord — BOOLEAN; TRUE if button is down, or FALSE if it isn't
SP
Errors
$0605    emBadBttnNoErr          The button number given was not 0 or 1
C
extern pascal Boolean Button(buttonNum) 
Docs

1️⃣




$0E06

StillDown

Tests whether the specified mouse button is still down

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
buttonNumWord — Number of button (0 or 1) to check
SP
Stack after call
previous contents
buttonDownWord — BOOLEAN; TRUE if button down and no mouse events are pending in event queue for specifed button, FALSE if not
SP
Errors
$0605    emBadBttnNoErr          The button number given was not 0 or 1
C
extern pascal Boolean StillDown(buttonNum) 
Docs

1️⃣




$0F06

WaitMouseUp

Tests whether specified mouse button is still down. If not, removes preceding mouse-up event from queue and returns FALSE.

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
buttonNumWord — Number of button (0 or 1) to check
SP
Stack after call
previous contents
buttonDownFlagWord — BOOLEAN; TRUE if button down and no mouse events are pending in event queue for specifed button, FALSE if not
SP
Errors
$0605    emBadBttnNoErr          The button number given was not 0 or 1
C
extern pascal Boolean WaitMouseUp(buttonNum) 
Docs

1️⃣




$1006

TickCount

Returns current number of ticks (in sixtieths of a second) since system was last started

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
numTicks Long — Number of ticks since system startup
 
SP
Errors
$0605    emBadBttnNoErr          The button number given was not 0 or 1
C
extern pascal LongWord TickCount() 
Docs

1️⃣




$1106

GetDblTime

Returns max difference (in ticks) allowed for mouse clicks to be considered a double-click

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
maxTicks Long — Maximum number of ticks between mouse clicks
 
SP
Errors

None

C
extern pascal LongWord GetDblTime() 
Docs

1️⃣




$1206

GetCaretTime

Returns time (in ticks) between blicks of caret marking insertion point in text to be edited

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
numTicks Long — Number of ticks between blinks of the caret
 
SP
Errors

None

C
extern pascal LongWord GetCaretTime() 
Docs

1️⃣




$1306

SetSwitch

Generates a switch event - only switcher-type applications should make this call

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void SetSwitch() 
Docs

1️⃣




$1406

PostEvent

Posts an event into the event queue






$1506

FlushEvents

Removes all queue events of type(s) specified by mask up to the first event of type specified by stop mask

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
eventMaskWord — Types of events to be removed from queue
stopMaskWord — Event types to stop removal process
SP
Stack after call
previous contents
resultCodeWord — 0 = all events removed from queue, or event code = type of event that stopped process
SP
Errors

None

C
extern pascal Word FlushEvents(eventMask,stopMask) 
Docs

1️⃣




$1606

GetOSEvent

Returns next available queue event of a specified type(s) and removes it from the queue

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
eventMaskWord — Types of events to be removed from queue
eventPtr Long — POINTER to the event record in which event will be placed
 
SP
Stack after call
previous contents
gotEventFlagWord — BOOLEAN; TRUE if any specified event types available; FALSE if null event
SP
Errors

None

C
extern pascal Boolean GetOSEvent(eventMask,eventPtr) 
Docs

1️⃣




$1706

OSEventAvail

Allows application to look at next available queue event of specified type(s), but leaves event in queue

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
eventMaskWord — Specifies which types of queue events are of interest
eventPtr Long — POINTER to the event record in which event will be placed
 
SP
Stack after call
previous contents
gotEventFlagWord — BOOLEAN; TRUE if any specified event types available; FALSE if null event
SP
Errors

None

C
extern pascal Boolean OSEventAvail(eventMask,eventPtr) 
Docs

1️⃣




$1806

SetEventMask

Specifies the system event mask

Parameters
Stack before call
previous contents
sysEventMaskWord — System event mask
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetEventMask(sysEventMask) 
Docs

1️⃣




$1906

FakeMouse

Allows use of alternative pointing device, like graphics tablet, in place/conjuction of mouse

Parameters
Stack before call
previous contents
changedFlagWord — Indicates device's position and/or button state has changed
modLatch | paddingByte — Keyboard modifiers latch   | Byte — Set to 0
xPositionWord — Device's clamped absolute X position
yPositionWord — Device's clamped absolute Y position
buttonStatusWord — Device's button status
SP
Stack after call
previous contents
SP
Errors

None

C

Call must not be made by an application.

Docs

1️⃣




$1A06

SetAutoKeyLimit

Controls how repeated keystrokes are inserted into the event queue

Parameters
Stack before call
previous contents
newLimitWord — Limit for inserted auto-key events
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetAutoKeyLimit(newLimit) 
Docs

3️⃣




$1B06

GetKeyTranslation

Returns the identifier for the currently selected keystroke translation table

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
kTransIDWord — Keyboard translation identifier ($0000 to $00FF)
SP
Errors

None

C
extern pascal Word GetKeyTranslation() 
Docs

3️⃣




$1C06

SetKeyTranslation

Sets a new keystroke translation table

Parameters
Stack before call
previous contents
kTransIDWord — Keyboard translation identifier (low-order byte)
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetKeyTranslation(kTransID) 
Docs

3️⃣








Scheduler




Scheduler Calls
Routine#Description
SchBootInit$0107Initializes the Scheduler; called only by Tool Locator - not called by application
SchStartUp$0207Starts up the Scheduler for use by an application
SchShutDown$0307Shuts down the Scheduler when an application quits
SchVersion$0407Returns the version number of the Scheduler
SchReset$0507Resets the Scheduler; called only when system is reset - not called by application
SchStatus$0607Indicates whether the Scheduler is active
SchAddTask$0907Adds a task to the Scheduler queue
SchFlush$0A07Flushes all tasks in the Scheduler queue - must not be called by an application

Scheduler Calls


$0107

SchBootInit

Initializes the Scheduler; called only by Tool Locator - not called by application

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C

Call must not be made by an application.

Docs

2️⃣




$0207

SchStartUp

Starts up the Scheduler for use by an application

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void SchStartUp() 
Docs

2️⃣




$0307

SchShutDown

Shuts down the Scheduler when an application quits

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void SchShutDown() 
Docs

2️⃣




$0407

SchVersion

Returns the version number of the Scheduler

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
versionInfoWord — Version number of the Scheduler
SP
Errors

None

C
extern pascal Word SchVersion() 
Docs

2️⃣




$0507

SchReset

Resets the Scheduler; called only when system is reset - not called by application

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void SchReset() 
Docs

2️⃣




$0607

SchStatus

Indicates whether the Scheduler is active

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
activeFlagWord — BOOLEAN; TRUE if Scheduler active, FALSE if inactive
SP
Errors

None

C
extern pascal Boolean SchStatus() 
Docs

2️⃣




$0907

SchAddTask

Adds a task to the Scheduler queue

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
taskPtr Long — POINTER to task to be added
 
SP
Stack after call
previous contents
onQueueFlagWord — BOOLEAN; TRUE if task added to Scheduler's queue, FALSE if queue was full
SP
Errors

None

C
extern pascal Boolean SchAddTask(taskPtr) 
Docs

2️⃣




$0A07

SchFlush

Flushes all tasks in the Scheduler queue - must not be called by an application

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C

Call must not be made by an application.

Docs

2️⃣








Sound Tool Set




Sound Tool Set Calls
Routine#Description
SoundBootInit$0108Initializes the Sound Tool Set; called only by Tool Locator (not by application)
SoundStartUp$0208Starts up the Sound Tool Set for use by an application
SoundShutDown$0308Shuts down the Sound Tool Set when an application quits
SoundVersion$0408Returns the version number of the Sound Tool Set
SoundReset$0508Resets the Sound Tool Set; called only on reset - not called by application
SoundToolStatus$0608Indicates whether the Sound Tool Set is active
WriteRamBlock$0908Writes a specified number of bytes from system RAM into DOC RAM
ReadRamBlock$0A08Reads a specified number of bytes from DOC RAM into system RAM
GetTableAddres$0B08Returns the jump table address for the low-level routines (see Toolbox Ref Vol2, Table 21-5)
GetSoundVolume$0C08Reads the volume setting for a generator ($00 to $FF)
SetSoundVolume$0D08Changes volume setting for the volume registers in the DOC or changes system volume
FFStartSound$0E08Enables the DOC to start generating sound on a particular generator
FFStopSound$0F08Halts any specified sound generators that are generating sound
FFSoundStatus$1008Returns the status of all 15 sound generators
FFGeneratorStatus$1108Reads the first two bytes of the generator control block corresponding to a specified generator
SetSoundMIRQV$1208Sets up the entry point into the sound-interrupt handler
SetUserSoundIRQV$1308Sets up the entry point for an application-defined synthesizer interrupt handler
FFSoundDoneStatus$1408Returns the current Free-Form Synthesizer playing status
FFSetUpSound$1508Identical to the FFStartSound tool call but does not actually start playing the specified sound
FFStartPlaying$1608Starts playing the sound specified by the FFSetUpSound tool call on a specified set of generators
SetDOCReg$1708Sets the DOC registers for a generator's oscillator from register contents stored in a special format
ReadDOCReg$1808Reads the DOC registers for a generator's oscillator and stores them in the target memory location

Sound Tool Set Calls


$0108

SoundBootInit

Initializes the Sound Tool Set; called only by Tool Locator (not by application)

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C

Call must not be made by an application.

Docs

2️⃣




$0208

SoundStartUp

Starts up the Sound Tool Set for use by an application

Parameters
Stack before call
previous contents
dPageAddrWord — Bank $0 starting address for one page of direct-page space
SP
Stack after call
previous contents
SP
Errors
$0810    noDOCFndErr             The DOC or RAM was not found
$0818    sndAlreadyStrtErr       The Sound Tool Set is already started
C
extern pascal void SoundStartUp(dPageAddr) 
Docs

2️⃣




$0308

SoundShutDown

Shuts down the Sound Tool Set when an application quits

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void SoundShutDown() 
Docs

2️⃣




$0408

SoundVersion

Returns the version number of the Sound Tool Set

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
versionInfoWord — Version number of the Sound Tool Set
SP
Errors

None

C
extern pascal Word SoundVersion() 
Docs

2️⃣




$0508

SoundReset

Resets the Sound Tool Set; called only on reset - not called by application

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C

Call must not be made by an application.

Docs

2️⃣




$0608

SoundToolStatus

Indicates whether the Sound Tool Set is active

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
activeFlagWord — BOOLEAN; TRUE if Sound Tool Set active, FALSE if inactive
SP
Errors

None

C
extern pascal Word SoundToolStatus() 
Docs

2️⃣




$0908

WriteRamBlock

Writes a specified number of bytes from system RAM into DOC RAM

Parameters
Stack before call
previous contents
srcPtr Long — POINTER to data to be written from RAM
 
docStart Long — Starting address of DOC buffer to receive data
 
byteCountWord — Number of bytes to be written
SP
Stack after call
previous contents
SP
Errors
$0810    noDOCFndErr             The DOC or RAM was not found
$0811    docAddrRngErr           DOC address range error
C
extern pascal void WriteRamBlock(srcPtr,docStart,byteCount) 
Docs

2️⃣




$0A08

ReadRamBlock

Reads a specified number of bytes from DOC RAM into system RAM

Parameters
Stack before call
previous contents
destPtr Long — POINTER to starting RAM address where data will be written
 
docStart Long — Starting DOC address from which data will be read
 
byteCountWord — Number of bytes to be copied
SP
Stack after call
previous contents
SP
Errors
$0810    noDOCFndErr             The DOC or RAM was not found
$0811    docAddrRngErr           DOC address range error
C
extern pascal void ReadRamBlock(destPtr,docStart,byteCount) 
Docs

2️⃣




$0B08

GetTableAddres

Returns the jump table address for the low-level routines (see Toolbox Ref Vol2, Table 21-5)

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
jumpTableAddr Long — Jump table address for low-level routines
 
SP
Errors

None

C
extern pascal Pointer GetTableAddress() 
Docs

2️⃣




$0C08

GetSoundVolume

Reads the volume setting for a generator ($00 to $FF)

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
genNumberWord — Number of generator whose volume will be returned
SP
Stack after call
previous contents
volSettingWord — Volume setting, from $00 to $FF; high nibble of low-order byte significant
SP
Errors

None

C
extern pascal Word GetSoundVolume(genNumber) 
Docs

2️⃣




$0D08

SetSoundVolume

Changes volume setting for the volume registers in the DOC or changes system volume

Parameters
Stack before call
previous contents
volumeWord — Generator or system volume setting; $00-$FF
genNumberWord — Generator whose volume will be set; $00-$0E sets DOC, $0F-$FF sets system volume
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal Word SetSoundVolume(volume,genNumber) 
Docs

2️⃣




$0E08

FFStartSound

Enables the DOC to start generating sound on a particular generator

Parameters
Stack before call
previous contents
genNumFFSynthWord — Channel, generator, and type (see Toolbox Ref Vol2, Figure 21-4)
pBlockPtr Long — POINTER to parameter block for sound (see Toolbox Ref Vol2, Figure 21-5)
 
SP
Stack after call
previous contents
SP
Errors
$0812    noSAddrInitErr          The Sound Tool Set is not active
$0813    invalGenNumErr          Invalid generator number
$0814    synthModeErr            Synthesizer mode error
$0815    genBusyErr              The generator is already in user
C
extern pascal void FFStartSound(genNumFFSynth,pBlockPtr) 
Docs

2️⃣




$0F08

FFStopSound

Halts any specified sound generators that are generating sound

Parameters
Stack before call
previous contents
genMaskWord — Mask to stop generators (see Toolbox Ref Vol2, Figure 21-6)
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void FFStopSound(genMask) 
Docs

2️⃣




$1008

FFSoundStatus

Returns the status of all 15 sound generators

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
genStatusInfoWord — Status of all generators (bit 0 = generator 0 and so on)
SP
Errors

None

C
extern pascal Word FFSoundStatus() 
Docs

2️⃣




$1108

FFGeneratorStatus

Reads the first two bytes of the generator control block corresponding to a specified generator

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
genNumberWord — Number of generator whose status will be returned
SP
Stack after call
previous contents
genStatusWord — Status of genNumber (see Toolbox Ref Vol2, Figure 21-3)
SP
Errors

None

C
extern pascal Word FFGeneratorStatus() 
Docs

2️⃣




$1208

SetSoundMIRQV

Sets up the entry point into the sound-interrupt handler

Parameters
Stack before call
previous contents
sMasterIRQ Long — New master sound IRQ vector
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetSoundMIRQV(sMasterIRQ) 
Docs

2️⃣




$1308

SetUserSoundIRQV

Sets up the entry point for an application-defined synthesizer interrupt handler

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
userIRQVector Long — New user sound IRQ vector
 
SP
Stack after call
previous contents
oldIRQVector Long — Old user sound IRQ vector
 
SP
Errors

None

C
extern pascal Word SetUserSoundIRQV(userIRQVector) 
Docs

2️⃣




$1408

FFSoundDoneStatus

Returns the current Free-Form Synthesizer playing status

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
genNumberWord — Number of generator whose status will be returned
SP
Stack after call
previous contents
genDoneFlagWord — BOOLEAN; status of genNumber: TRUE if done playing, FALSE if playing
SP
Errors
$0813    invalGenNumErr          Invalid generator number
C
extern pascal Boolean FFSoundDoneStatus(genNumber) 
Docs

2️⃣




$1508

FFSetUpSound

Identical to the FFStartSound tool call but does not actually start playing the specified sound

Parameters
Stack before call
previous contents
channelGenWord — Channel, generator type word
genNumber Long — POINTER to FFStartSound parameter block
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void FFSetUpSound(channelGen,paramBlockPtr) 
Docs

3️⃣




$1608

FFStartPlaying

Starts playing the sound specified by the FFSetUpSound tool call on a specified set of generators

Parameters
Stack before call
previous contents
genWordWord — Flag word indicating which generators to start ($0000 is illegal and will cause system hang)
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void FFStartPlaying(genWord) 
Docs

3️⃣




$1708

SetDOCReg

Sets the DOC registers for a generator's oscillator from register contents stored in a special format

Parameters
Stack before call
previous contents
pBlockPtr Long — POINTER to DOC register parameter block
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetDOCReg(pBlockPtr) 
Docs

3️⃣




$1808

ReadDOCReg

Reads the DOC registers for a generator's oscillator and stores them in the target memory location

Parameters
Stack before call
previous contents
pBlockPtr Long — POINTER to DOC register parameter block
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void ReadDOCReg(pBlockPtr) 
Docs

3️⃣








ADB Tools




ADB Tools Calls
Routine#Description
ADBBootInit$0109Initializes the ADB Tool Set; called only by Tool Locator (not by application)
ADBStartUp$0209Starts up the ADB Tool Set
ADBShutDown$0309Shuts down the ADB Tool Set
ADBVersion$0409Returns the version number of the ADB Tool Set
ADBReset$0509Resets the ADB Tool Set; called only on system reset - not by application
ADBStatus$0609Indicates whether the ADB Tool Set is active
SendInfo$0909Sends data to the keyboard microcontroller or to an ADB device
ReadKeyMicroData$0A09Receives data from the keyboard microcontroller
ReadKeyMicroMemory$0B09Reads a data byte from the keyboard microcontroller memory
AsyncADBReceive$0D09Receives data from an ADB device
SyncADBReceive$0E09Receives data from an ADB device
AbsOn$0F09Enables automatic polling of an absolute device (not implemented - reserved for future use)
AbsOff$1009Disables automatic polling of an absolute device (not implemented - reserved for future use)
ReadAbs$1109Determines whether automatic polling of an absolute device is on or off (not implemented - reserved for future use)
GetAbsScale$1209Reads absolute device scaling values (reserved for future use)
SetAbsScale$1309Sets up scaling for absolute devices (reserved for future use)
SRQPoll$1409Adds a device to the SRQ list (if the device exists) so that an application can be notified when this device has data.
SRQRemove$1509Removes a device previously installed by the SRQPoll routine from the SRQ list
ClearSRQTable$1609Clears the SRQ list of all entries

ADB Tools Calls


$0109

ADBBootInit

Initializes the ADB Tool Set; called only by Tool Locator (not by application)

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C

Call must not be made by an application.

Docs

1️⃣




$0209

ADBStartUp

Starts up the ADB Tool Set

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void ADBStartUp() 
Docs

1️⃣




$0309

ADBShutDown

Shuts down the ADB Tool Set

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void ADBShutDown() 
Docs

1️⃣




$0409

ADBVersion

Returns the version number of the ADB Tool Set

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
versionInfoWord — Version number of the ADB Tool Set
SP
Errors

None

C
extern pascal Word ADBVersion() 
Docs

2️⃣




$0509

ADBReset

Resets the ADB Tool Set; called only on system reset - not by application

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C

Call must not be made by an application.

Docs

1️⃣




$0609

ADBStatus

Indicates whether the ADB Tool Set is active

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
activeFlagWord — BOOLEAN; TRUE if ADB Tool Set is active; FALSE if not
SP
Errors

None

C
extern pascal Boolean ADBStatus() 
Docs

1️⃣




$0909

SendInfo

Sends data to the keyboard microcontroller or to an ADB device

Parameters
Stack before call
previous contents
dataLengthWord — Number of bytes of data to be sent (see Toolbox Ref Vol1, Table 3-4)
dataPtr Long — POINTER to data; NIL if no data (see Toolbox Ref Vol1, Table 3-4)
 
adbCommandWord — ADB command to be issued
SP
Stack after call
previous contents
SP
Errors
$0910    cmndIncomplete          Command not completed
C
extern pascal void Sendinfo(dataLength,dataPtr,adbCommand) 
Docs

1️⃣




$0A09

ReadKeyMicroData

Receives data from the keyboard microcontroller

Parameters
Stack before call
previous contents
dataLengthWord — Number of bytes of data to be received (see Toolbox Ref Vol1, Table 3-3)
dataPtr Long — POINTER to data; NIL if no data (see Toolbox Ref Vol1, Table 3-3)
 
adbCommandWord — ADB command to be issued
SP
Stack after call
previous contents
SP
Errors
$0910    cmndIncomplete          Command not completed
C
extern pascal void ReadKeyMicroData(dataLength,dataPtr,adbCommand) 
Docs

1️⃣




$0B09

ReadKeyMicroMemory

Reads a data byte from the keyboard microcontroller memory

Parameters
Stack before call
previous contents
dataOutPtr Long — POINTER to location to store results of read
 
dataInPtr Long — POINTER to keyboard memory location to be read
 
adbCommandWord — ADB command to be issued, equal to $0009
SP
Stack after call
previous contents
SP
Errors
$0910    cmndIncomplete          Command not completed
C
extern pascal void ReadKeyMicroMem(dataOutPtr,dataInPtr,adbCommand) 
Docs

1️⃣




$0D09

AsyncADBReceive

Receives data from an ADB device

Parameters
Stack before call
previous contents
compPtr Long — POINTER to completion routine
 
adbCommandWord — ADB command, in form $C0+xyabcd, where $C0 is the Talk command, xy is the register, and abcd is the address
SP
Stack after call
previous contents
SP
Errors
$0910    cmndIncomplete          Command not completed
$0982    adbBusy                 ADB busy (command pending)
C
extern pascal void AsyncADBReceive(compPtr,adbCommand) 
Docs

1️⃣




$0E09

SyncADBReceive

Receives data from an ADB device

Parameters
Stack before call
previous contents
inputWordWord — ADB device command with high and low nibbles swapped
compPtr Long — POINTER to completion routine
 
adbCommandWord — ADB command to be issued, equal to $0048
SP
Stack after call
previous contents
SP
Errors
$0910    cmndIncomplete          Command not completed
$0982    adbBusy                 ADB busy (command pending)
C
extern pascal void SyncADBReceive(inputWord,compPtr,adbCommand) 
Docs

1️⃣




$0F09

AbsOn

Enables automatic polling of an absolute device (not implemented - reserved for future use)

Docs

1️⃣




$1009

AbsOff

Disables automatic polling of an absolute device (not implemented - reserved for future use)

Docs

1️⃣




$1109

ReadAbs

Determines whether automatic polling of an absolute device is on or off (not implemented - reserved for future use)

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
autoABSPollWord — BOOLEAN; TRUE if polling on, FALSE if polling off
SP
C

Call must not be made by an application.

Docs

1️⃣




$1209

GetAbsScale

Reads absolute device scaling values (reserved for future use)

Parameters
Stack before call
previous contents
dataInPtr Long — POINTER to ScaleRec; see "SetAbsScale"
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void GetAbsScale(dataInPtr) 
Docs

1️⃣




$1309

SetAbsScale

Sets up scaling for absolute devices (reserved for future use)

Parameters
Stack before call
previous contents
dataInPtr Long — POINTER to scale record (see Figure 3-2)
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetAbsScale(dataOutPtr) 
Docs

1️⃣




$1409

SRQPoll

Adds a device to the SRQ list (if the device exists) so that an application can be notified when this device has data.

Parameters
Stack before call
previous contents
compPtr Long — POINTER to completion routine
 
adbRegAddrWord — ADB register and address
SP
Stack after call
previous contents
SP
Errors
$0910    cmndIncomplete          Command not completed
$0983    devNotAtAddr            Device not at present address
$0984    sqrListFull             SQR list is full
C
extern pascal void SRQPoll(compPtr,adbRegAddr) 
Docs

1️⃣




$1509

SRQRemove

Removes a device previously installed by the SRQPoll routine from the SRQ list

Parameters
Stack before call
previous contents
adbRegAddrWord — ADB register and address
SP
Stack after call
previous contents
SP
Errors
$0910    cmndIncomplete          Command not completed
$0982    adbBusy                 ADB busy (command pending)
C
extern pascal void SRQRemove(adbRegAddr) 
Docs

1️⃣




$1609

ClearSRQTable

Clears the SRQ list of all entries

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void ClearSRQTable() 
Docs

1️⃣








SANE




SANE Calls
Routine#Description
SANEBootInit$010AInitializes the SANE Tool Set; called only by Tool Locator (not by application)
SANEStartup$020AStarts up the SANE Tool Set for use by an application
SANEShutDown$030AShuts down the SANE Tool Set when application quits
SANEVersion$040AReturns the version number of the SANE Tool Set
SANEReset$050AResets the SANE Tool Set; called only on system reset - not by application
SANEStatus$060AIndicates whether the SANE Tool Set is active
SANEFP816$090AContains basic arithmetic operations, comparisons, conversions, environmental control, and IEEE auxiliary operations.
SANEDecStr816$0A0AContains numeric scanners and formatters
SANEElems816$0B0AContains elementary functions, financial functions, and a random-number generator

SANE Calls


$010A

SANEBootInit

Initializes the SANE Tool Set; called only by Tool Locator (not by application)

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C

Call must not be made by an application.

Docs

2️⃣




$020A

SANEStartup

Starts up the SANE Tool Set for use by an application

Parameters
Stack before call
previous contents
dPageAddrWord — Bank $0 starting address for one page of direct-page space
SP
Stack after call
previous contents
SP
Errors

None

C
The call is made automatically in APW C. 
Docs

2️⃣




$030A

SANEShutDown

Shuts down the SANE Tool Set when application quits

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void SANEShutDown() 
Docs

2️⃣




$040A

SANEVersion

Returns the version number of the SANE Tool Set

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
versionInfoWord — Version number of the SANE Tool Set
SP
Errors

None

C
extern pascal Word SANEVersion() 
Docs

2️⃣




$050A

SANEReset

Resets the SANE Tool Set; called only on system reset - not by application

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C

Call must not be made by an application.

Docs

2️⃣




$060A

SANEStatus

Indicates whether the SANE Tool Set is active

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
activeFlagWord — BOOLEAN; TRUE if SANE Tool Set active, FALSE if inactive
SP
Errors

None

C
extern pascal Boolean SANEStatus() 
Docs

2️⃣




$090A

SANEFP816

Contains basic arithmetic operations, comparisons, conversions, environmental control, and IEEE auxiliary operations.

Parameters

See the Apple Numerics Manual for details.

Errors

None

C
extern pascal void SANEFP816() 
Docs

2️⃣




$0A0A

SANEDecStr816

Contains numeric scanners and formatters

Parameters

See the Apple Numerics Manual for details.

Errors

None

C
extern pascal void SANEDecStr816() 
Docs

2️⃣




$0B0A

SANEElems816

Contains elementary functions, financial functions, and a random-number generator

Parameters

See the Apple Numerics Manual for details.

Errors

None

C
extern pascal void SANEElems816() 
Docs

2️⃣








Integer Math




Integer Math Calls
Routine#Description
IMBootInit$010BInitializes the Integer Math Tool Set; called only by Tool Locator (not by application)
IMStartUp$020BStarts up the Integer Math Tool Set for use by an application
IMShutDown$030BShuts down the Integer Math Tool Set when application quits
IMVersion$040BReturns the version number of the Integer Math Tool Set
IMReset$050BResets the Integer Math Tool Set; called only on system reset - not by application
IMStatus$060BIndicates whether the Integer Math Tool Set is active
Multiply$090BMultiplies two Integer inputs and produces a Longint result
SDivide$0A0BDivides two Integers & produces a signed Integer quotient & a signed Integer remainder
UDivide$0B0BDivides two unsigned Integer inputs and produces an unsigned Integer quotient & an unsigned Integer remainder
LongMul$0C0BMultiplies two Longint values & produces a 64-bit result
LongDivide$0D0BDivides two unsigned Longint inputs and produces a Longint unsigned quotient and a Longint unsigned remainder.
FixRatio$0E0BTakes 2 signed Integers & produces a Fixed number as ratio of the numerator & denominator
FixMul$0F0BMultiplies two 32-bit Fixed inputs and produces a 32-bit Fixed result
FracMul$100BMultiplies two Frac inputs and returns a rounded Frac result. Overflows are pinned to the most positive or negative value, depending on the XOR of the signs of the input.
FixDiv$110BDivides two like inputs and returns a rounded Fixed result (no remainder)
FracDiv$120BDivides two like inputs and returns a rounded Frac result (no remainder)
FixRound$130BTakes a Fixed input and returns a rounded Integer result
FracSqrt$140BTakes a Frac input and returns a rounded Frac square root
FracCos$150BTakes a Fixed input (in radians) and returns its Frac cosine
FracSin$160BTakes a Fixed input (in radians) and returns its Frac sine
FixAtan2$170BTakes two like inputs & returns a Fixed arc tangent (in radians) of their coordinates
HiWord$180BReturns high-order word of a Long input
LoWord$190BReturns low-order word of a long input
Long2Fix$1A0BConverts a specified Longint value to its corresponding Fixed value
Fix2Long$1B0BConverts a Fixed value to its corresponding Longint value
Fix2Frac$1C0BConverts a Fixed value to its corresponding Frac value
Frac2Fix$1D0BConverts a specifed Frac value to its corresponding Fixed value
Fix2X$1E0BConverts a Fixed value to its corresponding Extended value
Frac2X$1F0BConverts a specified Frac value to its corresponding Extended value
X2Fix$200BConverts an Extended value to its corresponding Fixed value
X2Frac$210BConverts an Extended value to its corresponding Frac value
Int2Hex$220BTakes unsigned int & produces an Integer Math string representing the value in hexadecimal format
Long2Hex$230BTakes unsigned Longint value & produces an Integer Math string representing the value in hex format
Hex2Int$240BTakes an Integer Math string representing a hex value & returns an unsigned integer
Hex2Long$250BTakes Integer Math string representing a hex value & returns an unsigned Longint
Int2Dec$260BTakes signed or unsigned integer & produces IM string representing value in decimal format
Long2Dec$270BTakes a signed or unsigned Longint value and produces an Integer Math string representing the value in decimal format.
Dec2Int$280BTakes Integer Math string representing a decimal value & returns a signed/unsigned integer
Dec2Long$290BTakes Integer Math string representing a decimal value & produces a Longint value
Hexit$2A0BTakes unsigned integer & returns a 4-byte Int Math string representing value in hex format (on the stack)

Integer Math Calls


$010B

IMBootInit

Initializes the Integer Math Tool Set; called only by Tool Locator (not by application)

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C

Call must not be made by an application.

Docs

1️⃣




$020B

IMStartUp

Starts up the Integer Math Tool Set for use by an application

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void IMStartUp() 
Docs

1️⃣




$030B

IMShutDown

Shuts down the Integer Math Tool Set when application quits

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void IMShutDown() 
Docs

1️⃣




$040B

IMVersion

Returns the version number of the Integer Math Tool Set

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
versionInfoWord — Version number of the Integer Math Tool Set
SP
Errors

None

C
extern pascal Word IMVersion() 
Docs

2️⃣




$050B

IMReset

Resets the Integer Math Tool Set; called only on system reset - not by application

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C

Call must not be made by an application.

Docs

1️⃣




$060B

IMStatus

Indicates whether the Integer Math Tool Set is active

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
activeFlagWord — BOOLEAN; TRUE if Integer Math is active, FALSE if inactive
SP
Errors

None

C
extern pascal Boolean IMStatus() 
Docs

1️⃣




$090B

Multiply

Multiplies two Integer inputs and produces a Longint result

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
multiplicandWord — First INTEGER input
multiplierWord — Second INTEGER input
SP
Stack after call
previous contents
longIntResult Long — LONGINT result
 
SP
Errors

None

C
extern pascal Longint Multiply(multiplicand,multiplier) 
Docs

1️⃣




$0A0B

SDivide

Divides two Integers & produces a signed Integer quotient & a signed Integer remainder

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
wordspaceWord — Space for result
dividendWord — INTEGER dividend
divisorWord — INTEGER divisor
SP
Stack after call
previous contents
remainderWord — INTEGER remainder
quotientWord — INTEGER quotient
SP
Errors
$0B01    imBadInptParam          Bad input parameter
C
extern pascal IntDivRec SDivide(dividend,divisor) 
Docs

1️⃣




$0B0B

UDivide

Divides two unsigned Integer inputs and produces an unsigned Integer quotient & an unsigned Integer remainder

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
wordspaceWord — Space for result
dividendWord — INTEGER dividend
divisorWord — INTEGER divisor
SP
Stack after call
previous contents
remainderWord — INTEGER remainder
quotiendWord — INTEGER quotient
SP
Errors
$0B01    imBadInptParam          Bad input parameter
C
extern pascal WordDivReec UDivide(dividend,divisor) 
Docs

1️⃣




$0C0B

LongMul

Multiplies two Longint values & produces a 64-bit result

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
longspace Long — Space for result
 
multiplicand Long — First LONGINT input
 
multiplier Long — Second LONGINT input
 
SP
Stack after call
previous contents
msResult Long — Most significant 32 bits of the result
 
lsResult Long — Least significant 32 bits of the result
 
SP
Errors

None

C
extern pascal LongMulRec LongMul(multiplicand,multiplier) 
Docs

1️⃣




$0D0B

LongDivide

Divides two unsigned Longint inputs and produces a Longint unsigned quotient and a Longint unsigned remainder.

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
longspace Long — Space for result
 
dividend Long — Unsigned LONGINT dividend
 
divisor Long — Unsigned LONGINT divisor
 
SP
Stack after call
previous contents
remainder Long — Most significant 32 bits of the result
 
quotient Long — Least significant 32 bits of the result
 
SP
Errors

None

C
extern pascal LongDivRec LongDivide(dividend,divisor) 
Docs

1️⃣




$0E0B

FixRatio

Takes 2 signed Integers & produces a Fixed number as ratio of the numerator & denominator

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
numeratorWord — INTEGER specifying the input numerator
denominatorWord — INTEGER specifying the input denominator
SP
Stack after call
previous contents
fixedResult Long — FIXED result
 
SP
Errors

None

C
extern pascal Fixed FixRatio(numerator,denominator) 
Docs

1️⃣




$0F0B

FixMul

Multiplies two 32-bit Fixed inputs and produces a 32-bit Fixed result

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
multiplicand Long — First FIXED input
 
multiplier Long — Second FIXED input
 
SP
Stack after call
previous contents
product Long — FIXED result
 
SP
Errors

None

C
extern pascal Fixed FixMul(multiplicand,multiplier) 
Docs

1️⃣




$100B

FracMul

Multiplies two Frac inputs and returns a rounded Frac result. Overflows are pinned to the most positive or negative value, depending on the XOR of the signs of the input.

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
multiplicand Long — First FRAC input
 
multiplier Long — Second FRAC input
 
SP
Stack after call
previous contents
fracResult Long — Rounded FRAC result; pinned if out-of-range
 
SP
Errors

None

C
extern pascal Frac FracMul(multiplicand,multiplier) 
Docs

1️⃣




$110B

FixDiv

Divides two like inputs and returns a rounded Fixed result (no remainder)

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
dividend Long — First input
 
divisor Long — Second input (must be same type as dividend)
 
SP
Stack after call
previous contents
fixedResult Long — Rounded FIXED result; pinned if out-of-range
 
SP
Errors

None

C
extern pascal Fixed FixDiv(dividend,divisor) 
Docs

1️⃣




$120B

FracDiv

Divides two like inputs and returns a rounded Frac result (no remainder)

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
dividend Long — First input
 
divisor Long — Second input (must be same type as dividend)
 
SP
Stack after call
previous contents
fracResult Long — Rounded FRAC result; pinned if out-of-range
 
SP
Errors

None

C
extern pascal Frac FracDiv(dividend,divisor) 
Docs

1️⃣




$130B

FixRound

Takes a Fixed input and returns a rounded Integer result

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
fixedValue Long — Original FIXED value
 
SP
Stack after call
previous contents
intResultWord — Rounded INTEGER result
SP
Errors

None

C
extern pascal Integer FixRound(fixedValue) 
Docs

1️⃣




$140B

FracSqrt

Takes a Frac input and returns a rounded Frac square root

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
dividend Long — Original FRAC value
 
SP
Stack after call
previous contents
fracResult Long — Rounded FRAC square root
 
SP
Errors

None

C
extern pascal Frac FracSqrt(fracValue) 
Docs

1️⃣




$150B

FracCos

Takes a Fixed input (in radians) and returns its Frac cosine

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
angle Long — Angle in radians, as a FIXED value
 
SP
Stack after call
previous contents
fracCosineResult Long — FRAC cosine result
 
SP
Errors

None

C
extern pascal Frac FracCos(angle) 
Docs

1️⃣




$160B

FracSin

Takes a Fixed input (in radians) and returns its Frac sine

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
angle Long — Angle in radians, as a FIXED value
 
SP
Stack after call
previous contents
fracCosineResult Long — FRAC sine result
 
SP
Errors

None

C
extern pascal Frac FracSin(angle) 
Docs

1️⃣




$170B

FixAtan2

Takes two like inputs & returns a Fixed arc tangent (in radians) of their coordinates

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
input1 Long — First input
 
input2 Long — Second input (must be same type as first)
 
SP
Stack after call
previous contents
arcTanResult Long — FIXED arc tangent, in radians, of input1 and input2
 
SP
Errors

None

C
extern pascal Fixed FixATan2(input1,input2) 
Docs

1️⃣




$180B

HiWord

Returns high-order word of a Long input

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
longValue Long — Value whose high-order word will be returned
 
SP
Stack after call
previous contents
wordResultWord — High-order word of longValue
SP
Errors

None

C
extern pascal Word HiWord(longValue) 
Docs

1️⃣




$190B

LoWord

Returns low-order word of a long input

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
longValue Long — Value whose low-order word will be returned
 
SP
Stack after call
previous contents
wordResultWord — Low-order word of longValue
SP
Errors

None

C
extern pascal Word LoWord(longValue) 
Docs

1️⃣




$1A0B

Long2Fix

Converts a specified Longint value to its corresponding Fixed value

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
longIntValue Long — LONGINT value to be converted
 
SP
Stack after call
previous contents
fixedResult Long — FIXED result of the conversion; pinned if out-of-range
 
SP
Errors

None

C
extern pascal Fixed Long2Fix(longValue} 
Docs

1️⃣




$1B0B

Fix2Long

Converts a Fixed value to its corresponding Longint value

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
fixedValue Long — FIXED value to be converted
 
SP
Stack after call
previous contents
longIntResult Long — Rounded LONGINT result of conversion
 
SP
Errors

None

C
extern pascal Longint Fix2Long(fixedValue} 
Docs

1️⃣




$1C0B

Fix2Frac

Converts a Fixed value to its corresponding Frac value

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
fixedValue Long — FIXED value to be converted
 
SP
Stack after call
previous contents
fracResult Long — FRAC result of conversion; pinned if out-of-range
 
SP
Errors

None

C
extern pascal Frac Fix2Frac(fixedValue) 
Docs

1️⃣




$1D0B

Frac2Fix

Converts a specifed Frac value to its corresponding Fixed value

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
fracValue Long — FRAC value to be converted
 
SP
Stack after call
previous contents
fracResult Long — Rounded FIXED result
 
SP
Errors

None

C
extern pascal Fixed Frac2Fix(fracValue) 
Docs

1️⃣




$1E0B

Fix2X

Converts a Fixed value to its corresponding Extended value

Parameters
Stack before call
previous contents
fixedValue Long — FIXED input
 
extendPtr Long — POINTER to space for EXTENDED value
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void Fix2X(fixedValue,extendPtr) 
Docs

1️⃣




$1F0B

Frac2X

Converts a specified Frac value to its corresponding Extended value

Parameters
Stack before call
previous contents
fracValue Long — FRAC input
 
extendPtr Long — POINTER to space for EXTENDED value
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void Frac2X(fracValue,extendPtr) 
Docs

1️⃣




$200B

X2Fix

Converts an Extended value to its corresponding Fixed value

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
extendPtr Long — POINTER to EXTENDED value
 
SP
Stack after call
previous contents
fixedResult Long — Rounded FIXED result; pinned if out-of-range
 
SP
Errors

None

C
extern pascal Longint X2Fix(extendPtr) 
Docs

1️⃣




$210B

X2Frac

Converts an Extended value to its corresponding Frac value

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
extendPtr Long — POINTER to EXTENDED value
 
SP
Stack after call
previous contents
fracResult Long — Rounded FRAC result; pinned if out-of-range
 
SP
Errors

None

C
extern pascal Longint X2Frac(extendPtr) 
Docs

1️⃣




$220B

Int2Hex

Takes unsigned int & produces an Integer Math string representing the value in hexadecimal format

Parameters
Stack before call
previous contents
intValueWord — Unsigned INTEGER to be converted
strPtr Long — POINTER to space for Integer Math string
 
strLengthWord — Length of Integer Math string
SP
Stack after call
previous contents
SP
Errors
$0B04    imStrOverflow           Length of string is too short to represent the value
C
extern pascal void Int2Hex(intValue,strPtr,strLength) 
Docs

1️⃣




$230B

Long2Hex

Takes unsigned Longint value & produces an Integer Math string representing the value in hex format

Parameters
Stack before call
previous contents
longValue Long — Unsigned LONGINT value to be converted
 
strPtr Long — POINTER to space for Integer Math string
 
strLengthWord — Length of Integer Math string
SP
Stack after call
previous contents
SP
Errors
$0B04    imStrOverflow           Length of string is too short to represent the value
C
extern pascal void Long2Hex(longValue,strPtr,strLength) 
Docs

1️⃣




$240B

Hex2Int

Takes an Integer Math string representing a hex value & returns an unsigned integer

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
strPtr Long — POINTER to space for Integer Math string
 
strLengthWord — Length of Integer Math string
SP
Stack after call
previous contents
intResultWord — Unsigned INTEGER equivalent of the Integer Math string
SP
Errors
$0B02    imIllegalChar           Illegal character in the string
$0B03    imOverflow              Integer or longint overflow
C
extern pascal word Hex2Int(strPtr,strLength) 
Docs

1️⃣




$250B

Hex2Long

Takes Integer Math string representing a hex value & returns an unsigned Longint

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
strPtr Long — POINTER to space for Integer Math string
 
strLengthWord — Length of Integer Math string
SP
Stack after call
previous contents
longIntResult Long — Unsigned LONGINT equivalent of the Integer Math string
 
SP
Errors
$0B02    imIllegalChar           Illegal character in the string
$0B03    imOverflow              Integer or longint overflow
C
extern pascal LongWord Hex2Long(strPtr,strLength) 
Docs

1️⃣




$260B

Int2Dec

Takes signed or unsigned integer & produces IM string representing value in decimal format

Parameters
Stack before call
previous contents
wordValueWord — INTEGER to be converted
strPtr Long — POINTER to space for Integer Math string
 
strLengthWord — Length of Integer Math string
signedFlagWord — BOOLEAN; TRUE if wordValue is signed, FALSE if unsigned
SP
Stack after call
previous contents
SP
Errors
$0B04    imStrOverflow           Length of string is too short to represent the value
C
extern pascal void Int2Dec(wordValue,strPtr,strLength,signedFlag) 
Docs

1️⃣




$270B

Long2Dec

Takes a signed or unsigned Longint value and produces an Integer Math string representing the value in decimal format.

Parameters
Stack before call
previous contents
longValue Long — LONGINT to be converted
 
strPtr Long — POINTER to space for Integer Math string
 
strLengthWord — Length of Integer Math string
signedFlagWord — BOOLEAN; TRUE if wordValue is signed, FALSE if unsigned
SP
Stack after call
previous contents
SP
Errors
$0B04    imStrOverflow           Length of string is too short to represent the value
C
extern pascal void Long2Dec(longValue,strPtr,strLength,signedFlag) 
Docs

1️⃣




$280B

Dec2Int

Takes Integer Math string representing a decimal value & returns a signed/unsigned integer

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
strPtr Long — POINTER to Integer Math string
 
strLengthWord — Length of Integer Math string
signedFlagWord — 0 if intResult is unsigned, nonzero if intResult is signed
SP
Stack after call
previous contents
intResultWord — INTEGER equivalent of the Integer Math string
SP
Errors
$0B02    imIllegalChar           Illegal character in the string
$0B03    imOverflow              Integer or longint overflow
C
extern pascal Integer Dec2Int(strPtr,strLength,signedFlag) 
Docs

1️⃣




$290B

Dec2Long

Takes Integer Math string representing a decimal value & produces a Longint value

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
strPtr Long — POINTER to Integer Math string
 
strLengthWord — Length of Integer Math string
signedFlagWord — 0 if longIntResult is unsigned, nonzero if longIntResult is signed
SP
Stack after call
previous contents
longIntResultWord — LONGINT equivalent of the Integer Math string
SP
Errors
$0B02    imIllegalChar           Illegal character in the string
$0B03    imOverflow              Integer or longint overflow
C
extern pascal Longint Dec2long(strPtr,strLength,signedFlag) 
Docs

1️⃣




$2A0B

Hexit

Takes unsigned integer & returns a 4-byte Int Math string representing value in hex format (on the stack)

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
intValueWord — Unsigned INTEGER to be converted
SP
Stack after call
previous contents
hexResult Long — 4-byte Integer Math string representing value in hex format
 
SP
Errors

None

C
extern pascal LongWord HexIt(intValue) 
Docs

1️⃣








Text Tools




Text Tools Calls
Routine#Description
TextBootInit$010CInitializes the Text Tool Set; called only by Tool Locator
TextStartUp$020CStarts up the Text Tool Set for use by an application
TextShutDown$030CShuts down the Text Tool Set when an application quits
TextVersion$040CReturns the version number of the Text Tool Set
TextReset$050CResets the Text Tool Set; called only when the system is reset
TextStatus$060CIndicates whether the Text Tools Set is active
SetInGlobals$090CSets the global parameters for the input device
SetOutGlobals$0A0CSets the global parameters for the output device
SetErrGlobals$0B0CSets the global parameters for the error output device
GetInGlobals$0C0CReturns the current values for the input device global parameters
GetOutGlobals$0D0CReturns the current values for the output device global parameters
GetErrGlobals$0E0CReturns the current values for the error output device global parameters
SetInputDevice$0F0CSets the input device to a specified type and location
SetOutputDevice$100CSets the output device to a specified type and location
SetErrorDevice$110CSets the error output device to a specified type and location
GetInputDevice$120CReturns the type of driver installed as the input device
GetOutputDevice$130CReturns the type of driver installed as the output device
GetErrorDevice$140CReturns the type of driver installed as the error output device
InitTextDev$150CInitializes a specified text device
CtlTextDev$160CPasses a control code to a specified text device. Errors other than $0C01 can only occur for Pascal devices.
StatusTextDev$170CExecutes a status call to a specified text device
WriteChar$180CCombines a character with output global AND mask and OR mask and writes to output device
ErrWriteChar$190CCombines a character with output global AND & OR mask & writes to error output text device
WriteLine$1A0CCombines pointed-to Pascal-type string with out global mask, + CR, then output
ErrWriteLine$1B0CCombines pointed-to Pascal-type string with output global masks & write to error out
WriteString$1C0CCombines a pointed-to Pascal-type string (first byte = length) with output global masks & write to output device
ErrWriteString$1D0CCombines a pointed-to Pascal-type string (first byte = length) with the output global masks and writes to the error output text device.
TextWriteBlock$1E0CCombines a char string with output global masks & writes to output text device
ErrWriteBlock$1F0CCombines a char string with output global masks & write to error out
WriteCString$200CCombines a pointed-to C string with output global masks & write to output text device
ErrWriteCString$210CCombines a pointed-to C-type string (terminated with $00) with output global masks and writes the string to the error output text device.
ReadChar$220CReads a char from input text device, combines with input global mask, and puts char on stack
TextReadBlock$230CReads a block of characters from the input text device, combines with input global masks, and writes block to mem location at bufferPtr + offset
ReadLine$240CReads char string from input txt device, combines w/input global mask, & writes to mem loc

Text Tools Calls


$010C

TextBootInit

Initializes the Text Tool Set; called only by Tool Locator

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C

Call must not be made by an application.

Docs

2️⃣




$020C

TextStartUp

Starts up the Text Tool Set for use by an application

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void TextStartUp() 
Docs

2️⃣




$030C

TextShutDown

Shuts down the Text Tool Set when an application quits

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void TextShutDown() 
Docs

2️⃣




$040C

TextVersion

Returns the version number of the Text Tool Set

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
versionInfoWord — Version number of the Text Tool Set
SP
Errors

None

C
extern pascal Word TextVersion() 
Docs

2️⃣




$050C

TextReset

Resets the Text Tool Set; called only when the system is reset

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C

Call must not be made by an application.

Docs

2️⃣




$060C

TextStatus

Indicates whether the Text Tools Set is active

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
activeFlagWord — BOOLEAN; TRUE if Text Tool Set is active; FALSE if not
SP
Errors

None

C
extern pascal Boolean TextStatus() 
Docs

2️⃣




$090C

SetInGlobals

Sets the global parameters for the input device

Parameters
Stack before call
previous contents
andMaskWord — Global AND mask for input device (low-order byte only)
orMaskWord — Global OR mask for input device (low-order byte only)
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetInGlobals(andMask,orMask) 

You can also use the following alternate form of the call:

extern pascal void SetInGlobals(mask) 
Docs

2️⃣




$0A0C

SetOutGlobals

Sets the global parameters for the output device

Parameters
Stack before call
previous contents
andMaskWord — Global AND mask for output device (low-order byte only)
orMaskWord — Global OR mask for output device (low-order byte only)
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetOutGlobals(andMask,orMask) 

You can also use the following alternate form of the call:

extern pascal void SetOutGlobals(mask) 
Docs

2️⃣




$0B0C

SetErrGlobals

Sets the global parameters for the error output device

Parameters
Stack before call
previous contents
andMaskWord — Global AND mask for error device (low-order byte only)
orMaskWord — Global OR mask for error device (low-order byte only)
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetErrGlobals(andMask,orMask) 

You can also use the following alternate form of the call:

extern pascal void SetErrGlobals(mask) 
Docs

2️⃣




$0C0C

GetInGlobals

Returns the current values for the input device global parameters

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
wordspaceWord — Space for result
SP
Stack after call
previous contents
andMaskWord — Global AND mask for input device (low-order byte only)
orMaskWord — Global OR mask for input device (low-order byte only)
SP
Errors

None

C
extern pascal TxtMaskRec GetInGlobals() 
Docs

2️⃣




$0D0C

GetOutGlobals

Returns the current values for the output device global parameters

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
wordspaceWord — Space for result
SP
Stack after call
previous contents
andMaskWord — Global AND mask for output device (low-order byte only)
orMaskWord — Global OR mask for output device (low-order byte only)
SP
Errors

None

C
extern pascal TxtMaskRec GetOutGlobals() 
Docs

2️⃣




$0E0C

GetErrGlobals

Returns the current values for the error output device global parameters

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
wordspaceWord — Space for result
SP
Stack after call
previous contents
andMaskWord — Global AND mask for error device (low-order byte only)
orMaskWord — Global OR mask for error device (low-order byte only)
SP
Errors

None

C
extern pascal TxtMaskRec GetErrGlobals() 
Docs

2️⃣




$0F0C

SetInputDevice

Sets the input device to a specified type and location

Parameters
Stack before call
previous contents
deviceTypeWord — Input device type (0 = BASIC, 1 = Pascal, 2 = RAM based)
ptrOrSlot Long — Slot number for BASIC or Pascal driver, or POINTER to jump table for RAM-based driver
 
SP
Stack after call
previous contents
SP
Errors
$0C01    badDevType              Illegal device type
C
extern pascal void SetInputDevice(deviceType,ptrOrSlot) 

You can also use the following alternate form of the call:

extern pascal void SetInputDevice(deviceRec) 
Docs

2️⃣




$100C

SetOutputDevice

Sets the output device to a specified type and location

Parameters
Stack before call
previous contents
deviceTypeWord — Output device type (0 = BASIC, 1 = Pascal, 2 = RAM based)
ptrOrSlot Long — Slot number for BASIC or Pascal driver, or POINTER to jump table for RAM-based driver
 
SP
Stack after call
previous contents
SP
Errors
$0C01    badDevType              Illegal device type
C
extern pascal void SetOutputDevice(deviceType,ptrOrSlot) 

You can also use the following alternate form of the call:

extern pascal void SetOutputDevice(deviceRec) 
Docs

2️⃣




$110C

SetErrorDevice

Sets the error output device to a specified type and location

Parameters
Stack before call
previous contents
deviceTypeWord — Error device type (0 = BASIC, 1 = Pascal, 2 = RAM based)
ptrOrSlot Long — Slot number for BASIC or Pascal driver, or POINTER to jump table for RAM-based driver
 
SP
Stack after call
previous contents
SP
Errors
$0C01    badDevType              Illegal device type
C
extern pascal void SetErrortDevice(deviceType,ptrOrSlot) 

You can also use the following alternate form of the call:

extern pascal void SetErrortDevice(deviceRec) 
Docs

2️⃣




$120C

GetInputDevice

Returns the type of driver installed as the input device

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
longspace Long — Space for result
 
SP
Stack after call
previous contents
deviceTypeWord — Input device type (0 = BASIC, 1 = Pascal, 2 = RAM based)
ptrOrSlot Long — Slot number for BASIC or Pascal driver, or POINTER to jump table for RAM-based driver
 
SP
Errors

None

C
extern pascal DeviceRec GetInputDevice() 
Docs

2️⃣




$130C

GetOutputDevice

Returns the type of driver installed as the output device

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
longspace Long — Space for result
 
SP
Stack after call
previous contents
deviceTypeWord — Output device type (0 = BASIC, 1 = Pascal, 2 = RAM based)
ptrOrSlot Long — Slot number for BASIC or Pascal driver, or POINTER to jump table for RAM-based driver
 
SP
Errors

None

C
extern pascal DeviceRec GetOutputDevice() 
Docs

2️⃣




$140C

GetErrorDevice

Returns the type of driver installed as the error output device

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
longspace Long — Space for result
 
SP
Stack after call
previous contents
deviceTypeWord — Error device type (0 = BASIC, 1 = Pascal, 2 = RAM based)
ptrOrSlot Long — Slot number for BASIC or Pascal driver, or POINTER to jump table for RAM-based driver
 
SP
Errors

None

C
extern pascal DeviceRec GetErrorDevice() 
Docs

2️⃣




$150C

InitTextDev

Initializes a specified text device

Parameters
Stack before call
previous contents
deviceNumWord — Device to initialize (0 = input, 1 = output, 2 = error output)
SP
Stack after call
previous contents
SP
Errors
$0C01    badDevType              Illegal device type
C
extern pascal void InitTextDev(deviceNum) 
Docs

2️⃣




$160C

CtlTextDev

Passes a control code to a specified text device. Errors other than $0C01 can only occur for Pascal devices.

Parameters
Stack before call
previous contents
deviceNumWord — Device to initialize (0 = input, 1 = output, 2 = error output)
controlCodeWord — Control code (in low-order byte) to pass to device
SP
Stack after call
previous contents
SP
Errors
$0C01    badDevType              Illegal device type
$0C02    badDevNum               Illegal device number
$0C03    badMode                 Illegal operation
$0C04    unDefHW                 Undefined hardware error
$0C06    lostFile                File is not longer available
$0C06    lostFile                File is not longer available
$0C07    badTitle                Illegal file name
$0C08    noRoom                  Insufficient space on the specified diskette
$0C09    noDevice                Specified volume is not on line
$0C0A    noFile                  Specified file is not in the directory given
$0C0B    dupFile                 Duplicate file
$0C0C    notClosed               Attempt to open a file that is already open
$0C0D    notOpen                 Attempt to access a closed file
$0C0E    badFormat               Error reading real or integer number
$0C0F    ringBufOFlo             Ring buffer overflow
$0C10    writeProtected          The specified disk is write protected
$0C40    devErr                  The device did not complete a read or write
C
extern pascal void InitTextDev(deviceNum) 
Docs

2️⃣




$170C

StatusTextDev

Executes a status call to a specified text device

Parameters
Stack before call
previous contents
deviceNumWord — Device to initialize (0 = input, 1 = output, 2 = error output)
requestCodeWord — Request code (in low-order byte) to pass to deviceNum
SP
Stack after call
previous contents
SP
Errors
Pascal device errors             Any of the errors $0C02-$0C40 listed in Toolbox Ref. Vol3 section 'Text Tool Set Summary' (or see CtlTextDev Tool Call)
C
extern pascal void StatusTextDev(deviceNum,requestCode) 
Docs

2️⃣




$180C

WriteChar

Combines a character with output global AND mask and OR mask and writes to output device

Parameters
Stack before call
previous contents
theCharWord — Character to write (in low-order byte)
SP
Stack after call
previous contents
SP
Errors
Pascal device errors             Any of the errors $0C02-$0C40 listed in Toolbox Ref. Vol3 section 'Text Tool Set Summary' (or see CtlTextDev Tool Call)
C
extern pascal void WriteChar(theChar) 
Docs

2️⃣




$190C

ErrWriteChar

Combines a character with output global AND & OR mask & writes to error output text device

Parameters
Stack before call
previous contents
theCharWord — Character to write (in low-order byte)
SP
Stack after call
previous contents
SP
Errors
Pascal device errors             Any of the errors $0C02-$0C40 listed in Toolbox Ref. Vol3 section 'Text Tool Set Summary' (or see CtlTextDev Tool Call)
C
extern pascal void ErrWriteChar(theChar) 
Docs

2️⃣




$1A0C

WriteLine

Combines pointed-to Pascal-type string with out global mask, + CR, then output

Parameters
Stack before call
previous contents
strPtr Long — POINTER to Pascal-type string to be written
 
SP
Stack after call
previous contents
SP
Errors
Pascal device errors             Any of the errors $0C02-$0C40 listed in Toolbox Ref. Vol3 section 'Text Tool Set Summary' (or see CtlTextDev Tool Call)
C
extern pascal void WriteLine(strPtr) 
Docs

2️⃣




$1B0C

ErrWriteLine

Combines pointed-to Pascal-type string with output global masks & write to error out

Parameters
Stack before call
previous contents
strPtr Long — POINTER to Pascal-type string
 
SP
Stack after call
previous contents
SP
Errors
Pascal device errors             Any of the errors $0C02-$0C40 listed in Toolbox Ref. Vol3 section 'Text Tool Set Summary' (or see CtlTextDev Tool Call)
C
extern pascal void ErrWriteLine(strPtr) 
Docs

2️⃣




$1C0C

WriteString

Combines a pointed-to Pascal-type string (first byte = length) with output global masks & write to output device

Parameters
Stack before call
previous contents
strPtr Long — POINTER to Pascal-type string to be written
 
SP
Stack after call
previous contents
SP
Errors
Pascal device errors             Any of the errors $0C02-$0C40 listed in Toolbox Ref. Vol3 section 'Text Tool Set Summary' (or see CtlTextDev Tool Call)
C
extern pascal void WriteString(strPtr) 
Docs

2️⃣




$1D0C

ErrWriteString

Combines a pointed-to Pascal-type string (first byte = length) with the output global masks and writes to the error output text device.

Parameters
Stack before call
previous contents
strPtr Long — POINTER to Pascal-type string to be written
 
SP
Stack after call
previous contents
SP
Errors
Pascal device errors             Any of the errors $0C02-$0C40 listed in Toolbox Ref. Vol3 section 'Text Tool Set Summary' (or see CtlTextDev Tool Call)
C
extern pascal void ErrWriteString(strPtr) 
Docs

2️⃣




$1E0C

TextWriteBlock

Combines a char string with output global masks & writes to output text device

Parameters
Stack before call
previous contents
textPtr Long — POINTER to start of ASCII text
 
offsetWord — Offset within ASCII text
countWord — String length
SP
Stack after call
previous contents
SP
Errors
Pascal device errors             Any of the errors $0C02-$0C40 listed in Toolbox Ref. Vol3 section 'Text Tool Set Summary' (or see CtlTextDev Tool Call)
C
extern pascal void Text WriteBlock(textPtr,offset,count) 
Docs

2️⃣




$1F0C

ErrWriteBlock

Combines a char string with output global masks & write to error out

Parameters
Stack before call
previous contents
textPtr Long — POINTER to start of ASCII text
 
offsetWord — Offset within ASCII text
countWord — String length
SP
Stack after call
previous contents
SP
Errors
Pascal device errors             Any of the errors $0C02-$0C40 listed in Toolbox Ref. Vol3 section 'Text Tool Set Summary' (or see CtlTextDev Tool Call)
C
extern pascal void Text ErrWriteBlock(textPtr,offset,count) 
Docs

2️⃣




$200C

WriteCString

Combines a pointed-to C string with output global masks & write to output text device

Parameters
Stack before call
previous contents
cStrPtr Long — POINTER to C-type string to be written
 
SP
Stack after call
previous contents
SP
Errors
Pascal device errors             Any of the errors $0C02-$0C40 listed in Toolbox Ref. Vol3 section 'Text Tool Set Summary' (or see CtlTextDev Tool Call)
C
extern pascal void WriteCString(strPtr) 
Docs

2️⃣




$210C

ErrWriteCString

Combines a pointed-to C-type string (terminated with $00) with output global masks and writes the string to the error output text device.

Parameters
Stack before call
previous contents
cStrPtr Long — POINTER to C-type string to be written
 
SP
Stack after call
previous contents
SP
Errors
Pascal device errors             Any of the errors $0C02-$0C40 listed in Toolbox Ref. Vol3 section 'Text Tool Set Summary' (or see CtlTextDev Tool Call)
C
extern pascal void ErrWriteCString(strPtr) 
Docs

2️⃣




$220C

ReadChar

Reads a char from input text device, combines with input global mask, and puts char on stack

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
echoFlagWord — Echo or don't echo character to output device (see Toolbox Ref Vol2, Figure 23-1)
SP
Stack after call
previous contents
SP
Errors
Pascal device errors             Any of the errors $0C02-$0C40 listed in Toolbox Ref. Vol3 section 'Text Tool Set Summary' (or see CtlTextDev Tool Call)
C
extern pascal Word ReadChar(echoFlag) 
Docs

2️⃣




$230C

TextReadBlock

Reads a block of characters from the input text device, combines with input global masks, and writes block to mem location at bufferPtr + offset

Parameters
Stack before call
previous contents
bufferPtr Long — POINTER to start of block
 
offsetWord — Offset to start of block to be read
blockSizeWord — Size of block to read
echoFlagWord — Echo or don't echo character to output device (see Toolbox Ref Vol2, Figure 23-1)
SP
Stack after call
previous contents
SP
Errors
Pascal device errors             Any of the errors $0C02-$0C40 listed in Toolbox Ref. Vol3 section 'Text Tool Set Summary' (or see CtlTextDev Tool Call)
C
extern pascal void TextReadBlock(bufferPtr,offset,blockSize,echoFlag) 
Docs

2️⃣




$240C

ReadLine

Reads char string from input txt device, combines w/input global mask, & writes to mem loc

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
bufferPtr Long — POINTER to start of buffer.where characters will be written
 
maxCountWord — Maximum line length
eolCharWord — End-of-line character in low byte
echoFlagWord — Echo or don't echo character to output device (see Toolbox Ref Vol2, Figure 23-1)
SP
Stack after call
previous contents
charCountWord — Count of characters received
SP
Errors
Pascal device errors             Any of the errors $0C02-$0C40 listed in Toolbox Ref. Vol3 section 'Text Tool Set Summary' (or see CtlTextDev Tool Call)
C
extern pascal Word ReadLine(bufferPtr,maxCount,eolChar,echoFlag) 
Docs

2️⃣








RAMDisk Tool




RAMDisk Tool Calls
Routine#Description
RDBootInit$010DThis routine does nothing. It just returns to the caller. Do not use.
RDStartUp$020DThis routine does nothing. It just returns to the caller. Do not use.
RDShutDown$030DThis routine does nothing. It just returns to the caller. Do not use.
RDVersion$040DReturns the current version number of the RAMDisk tool set. The version is the same as the Memory Manager one.
RDReset$050DThis routine does nothing. It just returns to the caller. Do not use.
RDStatus$060DIndicates whether the RAMDisk Tool set is active
Kill$090DThis routine does nothing. It just returns to the caller. Do not use.
RDExecPCCmd$0A0DThis routine executes normal or extended SmartPort commands, using data from the zero page. See the IIgs Firmware Ref.
RDSetDiskSize$0B0DThis routine does nothing. It just returns to the caller. Do not use.
RDGetDiskSize$0C0DThis routine returns the current size of the RAMDisk in bytes

RAMDisk Tool Calls


$010D

RDBootInit

This routine does nothing. It just returns to the caller. Do not use.

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

Docs

🗒️




$020D

RDStartUp

This routine does nothing. It just returns to the caller. Do not use.

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

Docs

🗒️




$030D

RDShutDown

This routine does nothing. It just returns to the caller. Do not use.

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

Docs

🗒️




$040D

RDVersion

Returns the current version number of the RAMDisk tool set. The version is the same as the Memory Manager one.

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
versionWord — Version number of tool set
SP
Errors

None

C
extern pascal Word RDVersion() 
Docs

🗒️




$050D

RDReset

This routine does nothing. It just returns to the caller. Do not use.

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

Docs

🗒️




$060D

RDStatus

Indicates whether the RAMDisk Tool set is active

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
activeFlagWord — BOOLEAN; TRUE ($FFFF) = active. False ($0000) = not active.
SP
Errors

None

C
extern pascal Boolean RDStatus() 
Docs

🗒️




$090D

Kill

This routine does nothing. It just returns to the caller. Do not use.

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

Docs

🗒️




$0A0D

RDExecPCCmd

This routine executes normal or extended SmartPort commands, using data from the zero page. See the IIgs Firmware Ref.

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors
$01                            Bad command number
$21                            Bad Ctl or Status code
$27                            I/O error
$28                            No device error
$2D                            Bad block number
C
extern pascal void RDExecPCCmd() 
Docs

🗒️




$0B0D

RDSetDiskSize

This routine does nothing. It just returns to the caller. Do not use.

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

Docs

🗒️




$0C0D

RDGetDiskSize

This routine returns the current size of the RAMDisk in bytes

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
size Long — Size in bytes (unconfirmed)
 
SP
Errors

None

Docs

🗒️








Window Manager




Window Manager Calls
Routine#Description
WindBootInit$010EInitializes the Window Manager; called only by Tool Locator - not by application
WindStartUp$020EStarts up the Window Manager for use by an application
WindShutDown$030EShuts down the Window Manager when an application quits
WindVersion$040EReturns the version number of the Window Manager
WindReset$050EResets the Window Manager; called only when system reset - not by application
WindStatus$060EIndicates whether the Window Manager is active
NewWindow$090ECreates specified window per its params, adds to window list, returns pointer to new window's GrafPort
CheckUpdate$0A0ELooks from top to bottom in window list for visible window that needs updating - normally called by EventManager
CloseWindow$0B0ERemoves a specified window from the screen, disposes of all controls and RAM associated with that window, and deletes it from the window list.
DeskTop$0C0EControls the addition of regions to and subtraction of regions from the desktop and controls the current desktop pattern.
SetWTitle$0D0EChanges the title of a specified window to a specified title and redraw the window
GetWTitle$0E0EReturns the pointer to a specified window's title
SetFrameColor$0F0ESets the color of a specified window's frame. Does not redraw. Call HideWindow, SetFrameColor, then ShowWindow to redraw in new colors
GetFrameColor$100EReturns the color of a specifed window's frame
SelectWindow$110EMakes a specified window the active window
HideWindow$120EMakes a specified window invisible
ShowWindow$130EMakes a specified window visible if it was invisible and then draws the window
SendBehind$140EChanges position of a specified window, redrawing any exposed windows
FrontWindow$150EReturns a ptr to the first visible window in the windows list (that is, the active window)
SetInfoDraw$160ESets pointer to routine that draws information bar for specified window
FindWindow$170EIndicates which part of which window, if any, cursor was in when mouse button was pressed
TrackGoAway$180ETracks mouse until button released, highlighting the go-away region as the mouse stays inside of it
MoveWindow$190EMoves a specified window to another part of the screen without affecting its size
DragWindow$1A0EPulls around a dotted outline of a specified window, following movements of mouse until button is released
GrowWindow$1B0EPulls around a grow image of a specified window, following the movements of the mouse until the mouse button is released
SizeWindow$1C0EEnlarges or shrinks port rectangle of specified window's GrafPort to a specified width & height
TaskMaster$1D0ECalls GetNextEvent & looks in event part of task record to see if it can handle the event
BeginUpdate$1E0EReplaces visible region of window's GrafPort with intersection of visible & update region. Use pattern is BeginUpdate, draw window contents, EndUpdate.
EndUpdate$1F0ERestores normal visible region of specified window's GrafPort that was changed by BeginUpdate
GetWMgrPort$200EReturns a pointer to the Window Manager's port
PinRect$210EPins a specified point inside a specified rectangle
HiliteWindow$220EHighlights or unhighlights a specified window
ShowHide$230EShows or hides a window
BringToFront$240EBrings specified window to front of all windows and redraws windows as necessary (no highlight)
WindNewRes$250ECloses Window Manager's GrafPort & opens new GrafPort in the other SHR resolution (call after resolution change)
TrackZoom$260ETracks mouse until button released, hi-lighting zoom region if mouse location is inside it
ZoomWindow$270ESwitches size & position of specified window between its current size and position & its max size
SetWRefCon$280ESets value that is inside specified window record & is reserved for the application's use
GetWRefCon$290EReturns value from specified window's record that was passed to either NewWindow or SetWRefCon
GetNextWindow$2A0EReturns pointer to next window in window list after specified window; NIL if last window in list
GetWKind$2B0EIndicates whether a specified window is a system window or an application window
GetWFrame$2C0EReturns the bit flag that describes a specified window's frame type
SetWFrame$2D0ESets the bit flag that describes a specified window's frame type
GetStructRgn$2E0EReturns a handle to a specified window's structure region
GetContentRgn$2F0EReturns a handle to a specified window's content region
GetUpdateRgn$300EReturns a handle to a specified window's update region
GetDefProc$310EReturns pointer to routine that's called to draw, hit test, & define window's frame & behavior
SetDefProc$320ESets pointer to routine that defines drawing, hit test, window's frame and behavior
GetWControls$330EReturns the handle to the first control in the window's control list
SetOriginMask$340ESpecifies the mask used to put the horizontal origin on a grid (very useful for preserving dithered colors in 640 mode)
GetInfoRefCon$350EReturns value associated with the draw information bar routine for a specified window
SetInfoRefCon$360ESets value associated with the draw information bar routine for a specified window
GetZoomRect$370EReturns pointer to rectangle used as content's zoomed or unzoomed size for a specified window
SetZoomRect$380ESets rectangle to be used as content's zoomed or unzoomed size for a specified window
RefreshDesktop$390ERedraws the entire desktop and all the windows
InvalRect$3A0EAccumulates specified rectangle into update region of window whose GrafPort is current port (tells WM it needs updating)
InvalRgn$3B0EAccumulates specified region into update region of window whose GrafPort is current port (tells WM it needs updating)
ValidRect$3C0ERemoves specified rectangle from update region of current GrafPort window & cancels updates
ValidRgn$3D0ERemoves specified region from update region of current GrafPort window & cancels updates
GetContentOrig$3E0EReturns value used by TaskMaster to set origin of window's GrafPort when update event
SetContentOrig$3F0ESets the origin of the window's GrafPort when handling an update event
GetDataSize$400EReturns the height and width of the data area of a specified window
SetDataSize$410ESets the height and width of the data area of a specifed window
GetMaxGrow$420EReturns the maximum values to which a specified window's content region can grow
SetMaxGrow$430ESets the maximum values to which a specified window's content region can grow
GetScroll$440EReturns the number of pixels that TaskMaster will scroll content region when arrow scroll bar selected
SetScroll$450ESets the number of pixels that TaskMaster will scroll content region when arrow scroll bar selected
GetPage$460EReturns the number of pixels that TaskMaster will scroll content region when selected on scroll bar
SetPage$470ESets the number of pixels that TaskMaster will scroll content region when selected on scroll bar
GetContentDraw$480EReturns pointer to routine that draws content region of a specified window
SetContentDraw$490ESets pointer to routine that draws content region of a specified window
GetInfoDraw$4A0EReturns pointer to routine that draws information bar for specified window
SetSysWindow$4B0EMarks a specified window as a system window
GetSysWFlag$4C0EIndicate whether a specified window is a a system or an application window
StartDrawing$4D0EMakes a specified window the current port and sets its origin
SetWindowIcons$4E0ESets the icon font for the Window Manager
GetRectInfo$4F0ESets information rectangle to coordinates of the information bar rectangle
StartInfoDrawing$500EAllows application to draw or hit test outside of information bar definition procedure
EndInfoDrawing$510EPuts the Window Manager back into a global coordinate system
GetFirstWindow$520EReturns pointer to first window in the window list (window may not be the active window)
WindDragRect$530EPulls dotted outline of specified rectangle around screen, following the movements of the mouse until the mouse button is released
GetDragRect$540EReturns the address of the internal DragRect routine (undocumented?)
DrawInfoBar$550ERedraws the info bar of the window specified by grafPortPtr
WindowGlobal$560ESpecifies a mask that determines how Window Manager performs tasks and retuns windowGlobalFlag
SetContentOrigin$570ESets origin of windows GrafPort when hndlng updt event & ctrls scrolling of content region
GetWindowMgrGlobals$580EReturns a pointer to the Window Manager global data area - call not made by application
AlertWindow$590ECreates an alert window that displays a message pointed to by alertStrPtr
StartFrameDrawing$5A0ESets up to draw a window frame - should be called only be window definition procedures
EndFrameDrawing$5B0ERestores Window Manager variables after a call to StartFrameDrawing
ResizeWindow$5C0EMoves, resizes, and draws the window specified by grafPortPtr
TaskMasterContent$5D0EInternal routine that handles events inside the content region of a window. Your program should never issue this call.
TaskMasterKey$5E0EInternal routine that handles keystroke events inside the content region of a window. Your program should never issue this call.
TaskMaskerDA$5F0EThis call is the TaskMaster entry point for desk accessories
CompileText$600ECombines source text with either custom or standard strings to compile a result text string
NewWindow2$610EPerforms the same function as NewWindow but allows the input window template as a resource
ErrorWindow$620ECreates a dialog box displaying an error message for a specified error code
GetAuxWindInfo$630EReturns a pointer to a block of auxiliary data for a specified window
DoModalWindow$640EHandles user interaction in a window containing extended controls
MWGetCtlPart$650EReturns the part code from any TrackControl call made by the most recent DoModalWindow call
MWSetMenuProc$660EInforms DoModalWindow of the address of a routine to be called when the frontmost window changes inside a DoModalWindow call
MWStdDrawProc$670EMWStdDrawProc is what DoModalWindow calls to update a modal window if you do not supply your own update procedure
MWSetUpEditMenu$680ESets the sate of the standard emenu items based on the frontmost window
FindCursorCtl$690EReturns the handle for the control beneath a given point
ResizeInfoBar$6A0ESets the vertical size of a standard window's information bar
HandleDiskInsert$6B0ELets an application know about disks the user has inserted or ejected
UpdateWindow$6C0EUpdates the specified window if it has a content draw routine and the environment permits

Window Manager Calls


$010E

WindBootInit

Initializes the Window Manager; called only by Tool Locator - not by application

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C

Call must not be made by an application.

Docs

2️⃣




$020E

WindStartUp

Starts up the Window Manager for use by an application

Parameters
Stack before call
previous contents
userIDWord — ID number of the application
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void WindStartUp(UserID) 
Docs

2️⃣




$030E

WindShutDown

Shuts down the Window Manager when an application quits

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void WindShutDown() 
Docs

2️⃣




$040E

WindVersion

Returns the version number of the Window Manager

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
versionInfoWord — Version number of the Window Manager
SP
Errors

None

C
extern pascal Word WindVersion() 
Docs

2️⃣




$050E

WindReset

Resets the Window Manager; called only when system reset - not by application

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C

Call must not be made by an application.

Docs

2️⃣




$060E

WindStatus

Indicates whether the Window Manager is active

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
activeFlagWord — BOOLEAN; TRUE if Window Manager is active; FALSE if not
SP
Errors

None

C
extern pascal Word WindStatus() 
Docs

2️⃣




$090E

NewWindow

Creates specified window per its params, adds to window list, returns pointer to new window's GrafPort

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
paramListPtr Long — POINTER to parameter list (see Toolbox Ref Vol2, Table 25-9)
 
SP
Stack after call
previous contents
theWindow Long — POINTER to window's GrafPort; NIL if error
 
SP
Errors
$0E01    paramLenErr             The first word of the parameter list is the wrong size
$0E02    allocateErr             Unable to allocate the window record
C
extern pascal GrafPortPtr NewWindow(paramListPtr) 
Docs

2️⃣




$0A0E

CheckUpdate

Looks from top to bottom in window list for visible window that needs updating - normally called by EventManager

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
theEventPtr Long — POINTER to an event record
 
SP
Stack after call
previous contents
updateFlagWord — BOOLEAN; TRUE if update event found, otherwise FALSE
SP
Errors

None

C
extern pascal Boolean CheckUpdate(theEventPtr) 
Docs

2️⃣




$0B0E

CloseWindow

Removes a specified window from the screen, disposes of all controls and RAM associated with that window, and deletes it from the window list.

Parameters
Stack before call
previous contents
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void CloseWindow(theWindowPtr) 
Docs

2️⃣




$0C0E

DeskTop

Controls the addition of regions to and subtraction of regions from the desktop and controls the current desktop pattern.

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
deskTopOPWord — Operation to perform
dtParam Long — Parameter needed for operation
 
SP
Stack after call
previous contents
retParam Long — Possible return parameter (see Toolbox Ref Vol2, Table 25-5)
 
SP
Errors

None

C
extern pascal Pointer Desktop(deskTopOP,dtParam) 
Docs

2️⃣




$0D0E

SetWTitle

Changes the title of a specified window to a specified title and redraw the window

Parameters
Stack before call
previous contents
titlePtr Long — POINTER to new title
 
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetWTitle(titlePtr,theWindowPtr) 
Docs

2️⃣




$0E0E

GetWTitle

Returns the pointer to a specified window's title

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
titlePtr Long — POINTER to window's title string
 
SP
Errors

None

C
extern pascal Pointer GetWTitle(theWindowPtr) 
Docs

2️⃣




$0F0E

SetFrameColor

Sets the color of a specified window's frame. Does not redraw. Call HideWindow, SetFrameColor, then ShowWindow to redraw in new colors

Parameters
Stack before call
previous contents
newColorPtr Long — POINTER to five-word pattern/color table; NIL for default table
 
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetFrameColor(newColorPtr,theWindowPtr) 
Docs

2️⃣




$100E

GetFrameColor

Returns the color of a specifed window's frame

Parameters
Stack before call
previous contents
colorPtr Long — POINTER to five-word pattern/color table to be filled with window's color table
 
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void GetFrameColor(colorPtr,theWindowPtr) 
Docs

2️⃣




$110E

SelectWindow

Makes a specified window the active window

Parameters
Stack before call
previous contents
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SelectWindow(theWindowPtr) 
Docs

2️⃣




$120E

HideWindow

Makes a specified window invisible

Parameters
Stack before call
previous contents
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void HideWindow(theWindowPtr) 
Docs

2️⃣




$130E

ShowWindow

Makes a specified window visible if it was invisible and then draws the window

Parameters
Stack before call
previous contents
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void ShowWindow(theWindowPtr) 
Docs

2️⃣




$140E

SendBehind

Changes position of a specified window, redrawing any exposed windows

Parameters
Stack before call
previous contents
behindWindowPtr Long — POINTER to GrafFort or $FFFFFFFF=top, $FFFFFFFE=bottom
 
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SendBehind(behindWindowPtr,theWindowPtr) 
Docs

2️⃣




$150E

FrontWindow

Returns a ptr to the first visible window in the windows list (that is, the active window)

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
theWindowPtr Long — POINTER to active window's GrafPort; NIL if none visible
 
SP
Errors

None

C
extern pascal GrafPortPtr FrontWindow() 
Docs

2️⃣




$160E

SetInfoDraw

Sets pointer to routine that draws information bar for specified window

Parameters
Stack before call
previous contents
infoDrawPtr Long — POINTER to draw information bar routine
 
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetInfoDraw(infoDrawPtr,theWindowPtr) 
Docs

2️⃣




$170E

FindWindow

Indicates which part of which window, if any, cursor was in when mouse button was pressed

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
whichWindowPtr Long — POINTER to space to store pointer to window; NIL if not found
 
pointXWord — X point to check, in global coordinates
pointYWord — Y point to check, in global coordinates
SP
Stack after call
previous contents
locationWord — Mouse-down event location (see Toolbox Ref Vol2, Table 25-8)
SP
Errors

None

C
extern pascal Word FindWindow(whichWindowPtr,pointX,pointY) 
Docs

2️⃣




$180E

TrackGoAway

Tracks mouse until button released, highlighting the go-away region as the mouse stays inside of it

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
startXWord — Starting X coordinate of cursor, in global coordinates
startYWord — Starting Y coordinate of cursor, in global coordinates
whichWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
goAwayWord — BOOLEAN; TRUE if go-away selected when button released, FALSE if not
SP
Errors

None

C
extern pascal Boolean TrackGoAway(startX,startY,theWindowPtr) 
Docs

2️⃣




$190E

MoveWindow

Moves a specified window to another part of the screen without affecting its size

Parameters
Stack before call
previous contents
newXWord — New X coordinate of content region's upper left corner (global)
newYWord — New Y coordinate of content region's upper left corner (global)
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void MoveWindow(newX,newY,theWindowPtr) 
Docs

2️⃣




$1A0E

DragWindow

Pulls around a dotted outline of a specified window, following movements of mouse until button is released

Parameters
Stack before call
previous contents
gridWord — Drag resolution, zero for default (see Table 25-7)
startXWord — Starting X coordinate of cursor, in global coordinates
startYWord — Starting Y coordinate of cursor, in global coordinates
graceWord — Grace buffer around bounds
boundsRectPtr Long — POINTER to RECT structure for cursor boundary, NIL for default
 
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void DragWindow(grid,startX,startY,grace,boundsRectPtr,theWindowPtr) 
Docs

2️⃣




$1B0E

GrowWindow

Pulls around a grow image of a specified window, following the movements of the mouse until the mouse button is released

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
minWidthWord — Minimum width of content region
minHeightWord — Minimum height of content region
startXWord — Starting X coordinate of cursor, in global coordinates
startYWord — Starting Y coordinate of cursor, in global coordinates
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
newSize Long — High word = new width; low word = new height
 
SP
Errors

None

C
extern pascal LongWord GrowWindow(minWidth,minHeight,startX,startY,theWindowPtr) 
Docs

2️⃣




$1C0E

SizeWindow

Enlarges or shrinks port rectangle of specified window's GrafPort to a specified width & height

Parameters
Stack before call
previous contents
newWidthWord — New width of window in pixels
newHeightWord — New height of window in pixels
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SizeWindow(newWidth,newHeight,theWindowPtr) 
Docs

2️⃣




$1D0E

TaskMaster

Calls GetNextEvent & looks in event part of task record to see if it can handle the event

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
taskMaskWord — Mask used by TaskMaster to call GetNextEvent
taskRecPtr Long — POINTER to Window Manager task record
 
SP
Stack after call
previous contents
taskCodeWord — Code indicating action to be taken; 0=no further task to perform
SP
Errors
$0E03    taskMaskErr             Some reserved bits were not clear in the wmTaskMask field of the wmTaskRec record
C
extern pascal Word TaskMaster(taskMask,taskRecPtr) 
Docs

2️⃣




$1E0E

BeginUpdate

Replaces visible region of window's GrafPort with intersection of visible & update region. Use pattern is BeginUpdate, draw window contents, EndUpdate.

Parameters
Stack before call
previous contents
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void BeginUpdate(theWindowPtr) 
Docs

2️⃣




$1F0E

EndUpdate

Restores normal visible region of specified window's GrafPort that was changed by BeginUpdate

Parameters
Stack before call
previous contents
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void EndUpdate(theWindowPtr) 
Docs

2️⃣




$200E

GetWMgrPort

Returns a pointer to the Window Manager's port

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
wPortPtr Long — POINTER to Window Manager's GrafPort
 
SP
Errors

None

C
extern pascal GrafPortPtr GetWMgrPort() 
Docs

2️⃣




$210E

PinRect

Pins a specified point inside a specified rectangle

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
theXPtWord — X coordinate of point to be pinned
theYPtWord — Y coordinate of point to be pinned
theRectPtr Long — POINTER to RECT data structure defining boundary of point
 
SP
Stack after call
previous contents
pinnedPt Long — POINT; high word = X coordinate, low word = Y coordinate
 
SP
Errors

None

C
extern pascal Long PinRect(theXPt,theYPt,theRectPtr) 

You can also use the following alternate form of the call:

extern pascal Long PinRect(thePoint,theRectPtr) 
Docs

2️⃣




$220E

HiliteWindow

Highlights or unhighlights a specified window

Parameters
Stack before call
previous contents
fHiliteFlagWord — BOOLEAN; TRUE to highlight window, FALSE to unhighlight
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void HiliteWindow(fHiliteFlag,theWindowPtr) 
Docs

2️⃣




$230E

ShowHide

Shows or hides a window

Parameters
Stack before call
previous contents
showFlagWord — BOOLEAN; TRUE to show, FALSE to hide
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void ShowHide(showFlag,theWindowPtr) 
Docs

2️⃣




$240E

BringToFront

Brings specified window to front of all windows and redraws windows as necessary (no highlight)

Parameters
Stack before call
previous contents
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void BringToFront(theWindowPtr) 
Docs

2️⃣




$250E

WindNewRes

Closes Window Manager's GrafPort & opens new GrafPort in the other SHR resolution (call after resolution change)

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void WindNewRes 
Docs

2️⃣




$260E

TrackZoom

Tracks mouse until button released, hi-lighting zoom region if mouse location is inside it

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
startXWord — Starting X coordinate of cursor, in global coordinates
startYWord — Starting Y coordinate of cursor, in global coordinates
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
zoomWord — BOOLEAN; TRUE if zoom region was selected, FALSE if not
SP
Errors

None

C
extern pascal Boolean TrackZoom(startX,startY,theWindowPtr) 

You can also use the following alternate form of the call:

extern pascal Boolean TrackZoom(start,theWindowPtr) 
Docs

2️⃣




$270E

ZoomWindow

Switches size & position of specified window between its current size and position & its max size

Parameters
Stack before call
previous contents
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void ZoomWindow(theWindowPtr) 
Docs

2️⃣




$280E

SetWRefCon

Sets value that is inside specified window record & is reserved for the application's use

Parameters
Stack before call
previous contents
wRefCon Long — Value of wRefCon field
 
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetWRefCon(wRefCon,theWindowPtr) 
Docs

2️⃣




$290E

GetWRefCon

Returns value from specified window's record that was passed to either NewWindow or SetWRefCon

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
wRefCon Long — Current value of wRefCon field
 
SP
Errors

None

C
extern pascal Longword GetWRefCon(theWindowPtr) 
Docs

2️⃣




$2A0E

GetNextWindow

Returns pointer to next window in window list after specified window; NIL if last window in list

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
nextWindowPtr Long — POINTER to next window's GrafPort in list; NIL if last window
 
SP
Errors

None

C
extern pascal GrafPortPtr GetNextWindow(theWindowPtr) 
Docs

2️⃣




$2B0E

GetWKind

Indicates whether a specified window is a system window or an application window

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
windowKindWord — Bit 15 is for application window, 1 for system window
SP
Errors

None

C
extern pascal Word GetWKind(theWindowPtr) 
Docs

2️⃣




$2C0E

GetWFrame

Returns the bit flag that describes a specified window's frame type

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
wFrameWord — Bit flag with window's frame type
SP
Errors

None

C
extern pascal Word GetWFrame(theWindowPtr) 
Docs

2️⃣




$2D0E

SetWFrame

Sets the bit flag that describes a specified window's frame type

Parameters
Stack before call
previous contents
wFrameWord — Bit flag with window's frame type
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal Word SetWFrame(wFrame,theWindowPtr) 
Docs

2️⃣




$2E0E

GetStructRgn

Returns a handle to a specified window's structure region

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
wStructHandle Long — HANDLE to window's structure region
 
SP
Errors

None

C
extern pascal RgnHandle GetStructRgn(theWindowPtr) 
Docs

2️⃣




$2F0E

GetContentRgn

Returns a handle to a specified window's content region

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
wContHandle Long — HANDLE to window's content region
 
SP
Errors

None

C
extern pascal RgnHandle GetContentRgn(theWindowPtr) 
Docs

2️⃣




$300E

GetUpdateRgn

Returns a handle to a specified window's update region

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
wUpdateHandle Long — HANDLE to window's update region
 
SP
Errors

None

C
extern pascal RgnHandle GetUpdateRgn(theWindowPtr) 
Docs

2️⃣




$310E

GetDefProc

Returns pointer to routine that's called to draw, hit test, & define window's frame & behavior

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
wDefProcPtr Long — POINTER to window's definition procedure
 
SP
Errors

None

C
extern pascal LongProcPtr GetDefProc(theWindowPtr) 
Docs

2️⃣




$320E

SetDefProc

Sets pointer to routine that defines drawing, hit test, window's frame and behavior

Parameters
Stack before call
previous contents
wDefProcPtr Long — POINTER to window's definition procedure
 
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetDefProc(wDefProcPtr,theWindowPtr) 
Docs

2️⃣




$330E

GetWControls

Returns the handle to the first control in the window's control list

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
controlHandle Long — HANDLE to first control in window's control list; NIL if none
 
SP
Errors

None

C
extern pascal CtlRecHndl GetWControls(theWindowPtr) 
Docs

2️⃣




$340E

SetOriginMask

Specifies the mask used to put the horizontal origin on a grid (very useful for preserving dithered colors in 640 mode)

Parameters
Stack before call
previous contents
originMaskWord — Mask used to place horizontal origin on a grid
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetOriginMask(originMask,theWindowPtr) 
Docs

2️⃣




$350E

GetInfoRefCon

Returns value associated with the draw information bar routine for a specified window

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
infoRefCon Long — Value passed to draw information bar routine
 
SP
Errors

None

C
extern pascal Longword GetinfoRefCon(theWindowPtr) 
Docs

2️⃣




$360E

SetInfoRefCon

Sets value associated with the draw information bar routine for a specified window

Parameters
Stack before call
previous contents
infoRefCon Long — Value passed to draw information bar routine
 
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal SetinfoRefCon(infoRefCon,theWindowPtr) 
Docs

2️⃣




$370E

GetZoomRect

Returns pointer to rectangle used as content's zoomed or unzoomed size for a specified window

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
wZoomSizePtr Long — POINTER to RECT data structure used as content's zoomed size
 
SP
Errors

None

C
extern pascal Rect* GetZoomRect(theWindowPtr) 
Docs

2️⃣




$380E

SetZoomRect

Sets rectangle to be used as content's zoomed or unzoomed size for a specified window

Parameters
Stack before call
previous contents
wZoomSizePtr Long — POINTER to rectangle to be used as content's zoomed size
 
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetZoomRect(wZoomSizePtr,theWindowPtr) 
Docs

2️⃣




$390E

RefreshDesktop

Redraws the entire desktop and all the windows

Parameters
Stack before call
previous contents
redrawRect Long — POINTER to RECT of rectangle to redraw; NIL for entire screen
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void RefreshDesktop(redrawRect) 
Docs

2️⃣




$3A0E

InvalRect

Accumulates specified rectangle into update region of window whose GrafPort is current port (tells WM it needs updating)

Parameters
Stack before call
previous contents
badRectPtr Long — POINTER to RECT data structure of rectangle to be added
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void InvalRect(badRectPtr) 
Docs

2️⃣




$3B0E

InvalRgn

Accumulates specified region into update region of window whose GrafPort is current port (tells WM it needs updating)

Parameters
Stack before call
previous contents
badRgnHandle Long — HANDLE to region to be added to update region
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void InvalRgn(badRgnHandle) 
Docs

2️⃣




$3C0E

ValidRect

Removes specified rectangle from update region of current GrafPort window & cancels updates

Parameters
Stack before call
previous contents
goodRectPtr Long — POINTER to RECT data structure of rectangle to be removed
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void ValidRect(goodRectPtr) 
Docs

2️⃣




$3D0E

ValidRgn

Removes specified region from update region of current GrafPort window & cancels updates

Parameters
Stack before call
previous contents
goodRgnHandle Long — HANDLE to region to be subtracted from update region
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void ValidRgn(goodRgnHandle) 
Docs

2️⃣




$3E0E

GetContentOrig

Returns value used by TaskMaster to set origin of window's GrafPort when update event

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
origin Long — POINT; low word = Y origin, high word = X origin
 
SP
Errors

None

C
extern pascal Long GetContentOrigin(theWindowPtr) 
Docs

2️⃣




$3F0E

SetContentOrig

Sets the origin of the window's GrafPort when handling an update event

Parameters
Stack before call
previous contents
xOriginWord — Content region's horizontal offset into data area
yOriginWord — Content region's vertical offset into data area
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetContentOrigin(xOrigin,yOrigin,theWindowPtr) 
Docs

2️⃣




$400E

GetDataSize

Returns the height and width of the data area of a specified window

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
dataSize Long — Low word = height; high word = width
 
SP
Errors

None

C
extern pascal LongWord GetDataSize(theWindowPtr) 
Docs

2️⃣




$410E

SetDataSize

Sets the height and width of the data area of a specifed window

Parameters
Stack before call
previous contents
dataWidthWord — Width of data area in pixels
dataHeightWord — Height of data area in pixels
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetDataSize(dataWidth,dataHeight,theWindowPtr) 
Docs

2️⃣




$420E

GetMaxGrow

Returns the maximum values to which a specified window's content region can grow

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
maxGrow Long — Low word = maxHeight; high word = maxWidth
 
SP
Errors

None

C
extern pascal LongWord GetMaxGrow(theWindowPtr) 
Docs

2️⃣




$430E

SetMaxGrow

Sets the maximum values to which a specified window's content region can grow

Parameters
Stack before call
previous contents
maxWidthWord — Maximum content width in pixels
maxHeightWord — Maximum content height in pixels
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetMaxGrow(maxWidth,maxHeight,theWindowPtr) 
Docs

2️⃣




$440E

GetScroll

Returns the number of pixels that TaskMaster will scroll content region when arrow scroll bar selected

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
scrollAmount Long — Low word = vertical amount; high word = horizontal amount
 
SP
Errors

None

C
extern pascal LongWord GetScroll(theWindowPtr) 
Docs

2️⃣




$450E

SetScroll

Sets the number of pixels that TaskMaster will scroll content region when arrow scroll bar selected

Parameters
Stack before call
previous contents
hScrollWord — Number of pixels to scroll horizontally
vScrollWord — Number of pixels to scroll vertically
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetScroll(hScroll,vScroll,theWindowPtr) 
Docs

2️⃣




$460E

GetPage

Returns the number of pixels that TaskMaster will scroll content region when selected on scroll bar

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
pageAmount Long — Low word = vertical amount; high word = horizontal amount
 
SP
Errors

None

C
extern pascal void GetPage(theWindowPtr) 
Docs

2️⃣




$470E

SetPage

Sets the number of pixels that TaskMaster will scroll content region when selected on scroll bar

Parameters
Stack before call
previous contents
hPageWord — Number of pixels to page horizontally
vPageWord — Number of pixels to page vertically
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetPage(hPage,vPage,theWindowPtr) 
Docs

2️⃣




$480E

GetContentDraw

Returns pointer to routine that draws content region of a specified window

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
contentDrawPtr Long — POINTER to routine called to draw content region
 
SP
Errors

None

C
extern pascal VoidProcPtr GetContentDraw(theWindowPtr) 
Docs

2️⃣




$490E

SetContentDraw

Sets pointer to routine that draws content region of a specified window

Parameters
Stack before call
previous contents
contentDrawPtr Long — POINTER to routine to draw content region
 
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetContentDraw(contentDrawPtr,theWindowPtr) 
Docs

2️⃣




$4A0E

GetInfoDraw

Returns pointer to routine that draws information bar for specified window

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
infoDrawPtr Long — POINTER to routine called to draw information bar
 
SP
Errors

None

C
extern pascal VoidProcPtr GetContentDraw(theWindowPtr) 
Docs

2️⃣




$4B0E

SetSysWindow

Marks a specified window as a system window

Parameters
Stack before call
previous contents
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetSysWindow(theWindowPtr) 
Docs

2️⃣




$4C0E

GetSysWFlag

Indicate whether a specified window is a a system or an application window

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
sysFlagWord — BOOLEAN; TRUE if system window, FALSE if application window
SP
Errors

None

C
extern pascal Boolean GetSysWFlag(theWindowPtr) 
Docs

2️⃣




$4D0E

StartDrawing

Makes a specified window the current port and sets its origin

Parameters
Stack before call
previous contents
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void StartDrawing(theWindowPtr) 
Docs

2️⃣




$4E0E

SetWindowIcons

Sets the icon font for the Window Manager

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
newFontHandle Long — HANDLE to new icon font; negative to not replace font
 
SP
Stack after call
previous contents
oldFontHandle Long — HANDLE to icon font before call
 
SP
Errors

None

C
extern pascal FontHndl SetWindowicons(newFontHandle) 
Docs

2️⃣




$4F0E

GetRectInfo

Sets information rectangle to coordinates of the information bar rectangle

Parameters
Stack before call
previous contents
infoRectPtr Long — POINTER to destination RECT where rectangle will be stored
 
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void GetRectinfo(infoRectPtr,theWindowPtr) 
Docs

2️⃣




$500E

StartInfoDrawing

Allows application to draw or hit test outside of information bar definition procedure

Parameters
Stack before call
previous contents
infoRectPtr Long — POINTER to destination RECT where information bar's data will be stored
 
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void StartInfoDrawing(infoRectPtr,theWindowPtr) 
Docs

2️⃣




$510E

EndInfoDrawing

Puts the Window Manager back into a global coordinate system

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void EndInfoDrawing() 
Docs

2️⃣




$520E

GetFirstWindow

Returns pointer to first window in the window list (window may not be the active window)

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
firstWindowPtr Long — POINTER to first window, or NIL
 
SP
Errors

None

C
extern pascal GrafPortPtr GetFirstWindow() 
Docs

2️⃣




$530E

WindDragRect

Pulls dotted outline of specified rectangle around screen, following the movements of the mouse until the mouse button is released

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
actionProcPtr Long — POINTER to routine; NIL for default
 
dragPatternPtr Long — POINTER to pattern to use for drag outline
 
startXWord — X coordinate of starting point, in global coordinates
startYWord — Y coordinate of starting point, in global coordinates
dragRectPtr Long — POINTER to RECT data structure of rectangle to be dragged
 
limitRectPtr Long — POINTER to RECT of limit rectangle
 
slopRectPtr Long — POINTER to RECT of slop rectangle
 
dragFlagWord — Bit flag customizing drag rectangle (see Toolbox Ref Vol1 Figure 4-25)
SP
Stack after call
previous contents
moveDelta Long — High word = amount X changed; low word = amount Y changed
 
SP
Errors

None

C
extern pascal Longword WindDragRect(actionProcPtr,dragPatternPtr,startX,startY,dragRectPtr,limitRectPtr,slopRectPtr,dragFlag) 
Docs

2️⃣




$540E

GetDragRect

Returns the address of the internal DragRect routine (undocumented?)

Parameters

The stack is not affected by this call. There are no input or output parameters.

C

Call must not be made by an application.






$550E

DrawInfoBar

Redraws the info bar of the window specified by grafPortPtr

Parameters
Stack before call
previous contents
grafPortPtr Long — Pointer to GrafPort for window
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void DrawInfoBar(grafPortPtr) 
Docs

3️⃣




$560E

WindowGlobal

Specifies a mask that determines how Window Manager performs tasks and retuns windowGlobalFlag

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
windowGlobalMaskWord — Global mask (see Toolbox Ref Vol2, Table 25-11)
SP
Stack after call
previous contents
windowGlobalFlagWord — Current state of window global flag (see Toolbox Ref Vol2, Table 25-11)
SP
Errors

None

C
extern pascal Word WindowGlobal(windowGlobalMask) 
Docs

2️⃣




$570E

SetContentOrigin

Sets origin of windows GrafPort when hndlng updt event & ctrls scrolling of content region

Parameters
Stack before call
previous contents
xOriginWord — Content region's horizontal offset into data area
yOriginWord — Content region's vertical offset into data area
theWindowPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal SetContentOrigin(xOrigin,yOrigin,theWindowPtr) 
Docs

2️⃣




$580E

GetWindowMgrGlobals

Returns a pointer to the Window Manager global data area - call not made by application

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
globalDataPtr Long — Pointer to the global data area
 
SP
Errors

None

C
extern pascal Pointer GetWindowMgrGlobals() 
Docs

3️⃣




$590E

AlertWindow

Creates an alert window that displays a message pointed to by alertStrPtr

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
alertFlagsWord — Flag word for call
subStrPtr Long — POINTER to substitution array
 
alertStrRef Long — Reference to alert string; alertFlags indicates type
 
SP
Stack after call
previous contents
resultWord — Button number selected (0 relative, in order created
SP
Errors

None

C
extern pascal Word AlertWindow(alertFlags,subStrPtr,alertStrRef) 
Docs

3️⃣




$5A0E

StartFrameDrawing

Sets up to draw a window frame - should be called only be window definition procedures

Parameters
Stack before call
previous contents
windowPtr Long — Pointer to the window to be drawn
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void StartFrameDrawing(windowPtr) 
Docs

3️⃣




$5B0E

EndFrameDrawing

Restores Window Manager variables after a call to StartFrameDrawing

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void EndFrameDrawing() 
Docs

3️⃣




$5C0E

ResizeWindow

Moves, resizes, and draws the window specified by grafPortPtr

Parameters
Stack before call
previous contents
hiddenFlagWord — BOOLEAN; whether to hide covered area
rectPtr Long — POINTER to new content rectangle
 
grafPortPtr Long — POINTER to window's GrafPort
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void ResizeWindow(hiddenFlag,rectPtr,grafPortPtr) 
Docs

3️⃣




$5D0E

TaskMasterContent

Internal routine that handles events inside the content region of a window. Your program should never issue this call.

Docs

3️⃣




$5E0E

TaskMasterKey

Internal routine that handles keystroke events inside the content region of a window. Your program should never issue this call.

Docs

3️⃣




$5F0E

TaskMaskerDA

This call is the TaskMaster entry point for desk accessories

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
eventMaskWord — Not used
taskRecPtr Long — POINTER to extended task record
 
SP
Stack after call
previous contents
taskCodeWord — TaskMaster result code
SP
Errors

None

C
extern pascal Word TaskMasterDA(eventMask,taskRecPtr) 
Docs

3️⃣




$600E

CompileText

Combines source text with either custom or standard strings to compile a result text string

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
subTypeWord — Type of custom substitution strings
subStringsPtr Long — POINTER to substitution array
 
srcStringPtr Long — POINTER to source string
 
srcSizeWord — Length of source string being pointed to by srcStringPtr
SP
Stack after call
previous contents
stringHandle Long — HANDLE to result string
 
SP
Errors
$0E04    compileTooLarge         Compiled text is larger than 64K
C
extern pascal Handle CompileText(subType,subStringsPtr,srcStringPtr,srcSize) 
Docs

3️⃣




$610E

NewWindow2

Performs the same function as NewWindow but allows the input window template as a resource

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
titlePtr Long — POINTER to replacement title
 
refCon Long — RefCon to replace value in template
 
contentDrawPtr Long — POINTER to replacement content-draw routine
 
defProcPtr Long — POINTER to replacement window definition procedure
 
paramTableDescWord — Type of reference in paramTableRef
paramTableRef Long — Reference to window template
 
resourceTypeWord — Resource type of template referred to by paramTableRef
SP
Stack after call
previous contents
grafPortPtr Long — POINTER to window's GrafPort; NIL if error
 
SP
Errors
Resource Manager errors          Returned unchanged
Memory Manager errors            Returned unchanged
Window Manager errors            Returned unchanged
Control Manager errors           Returned unchanged
C
extern pascal Pointer NewWindow2(titlePtr,refCon,contentDrawPtr,defProcPtr,paramTableDesc,paramTableRef,resourceType) 
Docs

3️⃣




$620E

ErrorWindow

Creates a dialog box displaying an error message for a specified error code

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
subTypeWord — Type of custom substitution string
subStringPtr Long — POINTER to substitution string
 
errNumWord — GS/OS error number
SP
Stack after call
previous contents
buttonNumberWord — Number of the button clicked by the user
SP
Errors
Resource Manager errors          Returned unchanged
C
extern pascal Word ErrorWindow(subType,subStringPtr,errNum) 
Docs

3️⃣




$630E

GetAuxWindInfo

Returns a pointer to a block of auxiliary data for a specified window

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
theWindowPtr Long — Window pointer
 
SP
Stack after call
previous contents
auxInfoPtr Long — POINTER to auxiliary window record
 
SP
Errors
$0201    memErr                  Unable to allocate memory
C
extern pascal Pointer GetAuxWindInfo(theWindowPtr) 
Docs

📕




$640E

DoModalWindow

Handles user interaction in a window containing extended controls

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
eventPtr Long — POINTER to an extended task record
 
updateProc Long — POINTER to update procedure; NIL if for standard
 
eventHook Long — POINTER to event hook routine; NIL for none
 
beepProc Long — POINTER to beep procedure
 
flagsWord — Flags
SP
Stack after call
previous contents
ID Long — ID of control or menu item that was selected
 
SP
Errors

None

C
extern pascal Long DoModalWindow(eventPtr,updateProc,eventHook,beepProc,flags) 
Docs

📕




$650E

MWGetCtlPart

Returns the part code from any TrackControl call made by the most recent DoModalWindow call

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
ctlPartWord — Part code
SP
Errors

None

C
extern pascal Word MWGetCtlPart() 
Docs

📕




$660E

MWSetMenuProc

Informs DoModalWindow of the address of a routine to be called when the frontmost window changes inside a DoModalWindow call

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
newMenuProc Long — Pointer to new menu procedure or $FFFFFFFF
 
SP
Stack after call
previous contents
oldMenuProc Long — Pointer to previous menu procedure
 
SP
Errors

None

C
extern pascal VoidProcPtr MWSetMenuProc(newMenuProc) 
Docs

📕




$670E

MWStdDrawProc

MWStdDrawProc is what DoModalWindow calls to update a modal window if you do not supply your own update procedure

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void MWStdDrawProc() 
Docs

📕




$680E

MWSetUpEditMenu

Sets the sate of the standard emenu items based on the frontmost window

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void MWSetUpEditMenu() 
Docs

📕




$690E

FindCursorCtl

Returns the handle for the control beneath a given point

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
ctlHandlePtr Long — POINTER to space for control handle
 
xLocWord — Local X coordinate of point
yLocWord — Local Y coordinate of point
theWindowPtr Long — POINTER to the window to check; NIL for front window
 
SP
Stack after call
previous contents
partCodeWord — Part code for the control beneath the given point
SP
Errors

None

C
extern pascal unsigned int FindCursorCtl(ctlHandlePtr,xLoc,yLoc,theWindowPtr) 
Docs

📕




$6A0E

ResizeInfoBar

Sets the vertical size of a standard window's information bar

Parameters
Stack before call
previous contents
flagsWord — Flags (reserved, use 0)
newHeightWord — New information bar height
theWindowPtr Long — POINTER to the window
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void ResizeInfoBar(flags,newHeight,theWindowPtr) 
Docs

📕




$6B0E

HandleDiskInsert

Lets an application know about disks the user has inserted or ejected

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
wordspaceWord — Space for result
flagsWord — Input flags
devNumWord — GS/OS device number
SP
Stack after call
previous contents
resultFlagsWord — Resulting flags
resultFlagsWord — Resulting device number
SP
Errors
GS/OS errors                     Returned unchanged
C
extern pascal long HandleDiskInsert(flags,devNum) 
Docs

📕




$6C0E

UpdateWindow

Updates the specified window if it has a content draw routine and the environment permits

Parameters
Stack before call
previous contents
flagsWord — Input flags
theWindowPtr Long — Window to update
 
SP
Stack after call
previous contents
SP
Errors
$0E05    cantUpdateErr           Cannot update the specified window in the current environment
C
extern pascal void UpdateWindow(flags,theWindowPtr) 
Docs

📕











Menu Manager Calls
Routine#Description
MenuBootInit$010FInitializes the Menu Manager; called only by Tool Locator - not by application
MenuStartUp$020FStarts up the Menu Manager for use by an application
MenuShutDown$030FShuts down the Menu Manager when an application quits
MenuVersion$040FReturns the version number of the Menu Manager
MenuReset$050FResets the Menu Manager; called only when system reset - not by application
MenuStatus$060FIndicates whether the Menu Manager is active
MenuKey$090FMaps a character to the associated menu and item for that character
GetMenuBar$0A0FReturns the handle of the current menu bar
MenuRefresh$0B0FAttempts to refresh the screen.
FlashMenuBar$0C0FFlashes the entire current menu bar
InsertMenu$0D0FInserts a specified menu into the menu list after a specified menu item or at front of list
DeleteMenu$0E0FRemoves a specified menu from the menu list
InsertMItem$0F0FInserts a menu item into a menu after a specified menu item or at the front of the list
DeleteMItem$100FRemoves a specified item from the current menu
GetSysBar$110FReturns the handle of the current system menu bar
SetSysBar$120FSets a new system bar; the system menu bar becomes the current menu bar
FixMenuBar$130FComputes standard sizes for the menu bar and menus
CountMItems$140FReturns the number of items, including any dividing lines, in a specified menu
NewMenuBar$150FCreates a default menu bar with no menus
GetMHandle$160FReturns a handle to a menu record
SetBarColors$170FSets the normal, inverse, and outline colors of the current menu bar
GetBarColors$180FReturns the colors for the current menu bar
SetMTitleStart$190FSets the starting position for the leftmost title within the current menu bar
GetMTitleStart$1A0FReturns the starting position of the leftmost title within the current menu bar
GetMenuMgrPort$1B0FReturns a pointer to the Menu Manager's port
CalcMenuSize$1C0FSets menu dimensions, either manually or automatically
SetMTitleWidth$1D0FSets the width of a title
GetMTitleWidth$1E0FReturns the width of a menu title
SetMenuFlag$1F0FSets the menu to a specified state
GetMenuFlag$200FReturns the menu flag for a specified menu
SetMenuTitle$210FSpecifies the title for a menu
GetMenuTitle$220FReturns a pointer to the title of a menu
MenuGlobal$230FTurns menu help on/off or returns state of menu help; help user know inactive to active
SetMItem$240FSpecifies the name for a menu item by pointing to an item line
GetMItem$250FReturns a pointer to the name of an item
SetMItemFlag$260FSets specified item number to be underlined or not underlined & sets the highlighting style
GetMItemFlag$270FReturns values for a specified item, such as whether it is disabled, underlined or highlighted
SetMItemBlink$280FDetermines how many times all menu items should blink when selected
MenuNewRes$290FAdjusts screen resolution and redraws the current system menu bar
DrawMenuBar$2A0FDraws the current menu bar, along with any menu titles on the bar
MenuSelect$2B0FDraws highlighted titles, pulls down menus, and handles user interaction when a mouse button is clicked on a menu bar (see FindWindow routine if using Window Manager).
HiliteMenu$2C0FHighlights or unhighlights the title of a specified menu
NewMenu$2D0FAllocates space for a menu list and its items
DisposeMenu$2E0FFrees the memory allocated by NewMenu
InitPalette$2F0FReinitializes the palettes needed for the colored Apple logo in system menu bar (changes SCB for lines 2 through 9 to the first color from color tables 1 through 6)
EnableMItem$300FSets a specified menu item to display normally and allows it to be selected
DisableMItem$310FSets specified menu item to display in dimmed characters & does not allow it to be selected
CheckMItem$320FSets specified menu item to display or to not display a check mark to the left of the item
SetMItemMark$330FSets a specified menu item to display or to not display a specified character to the left of item
GetMItemMark$340FReturns the current character that is displayed to the left of a specified menu item
SetMItemStyle$350FSets the text style for a specified menu item
GetMItemStyle$360FReturns the text style for a specified menu item
SetMenuID$370FSpecifies a new menu number
SetMItemID$380FSpecifies the ID number of a menu item
SetMenuBar$390FSets the current menu bar
SetMItemName$3A0FSpecifies the aname of a menu item by pointing to a Pascal-type string
GetPopUpDefProc$3B0FReturns a pointer to the control definition procedure for pop-up menus (called during Control Manager startup) - application should not call
PopUpMenuSelect$3C0FDraws highlighted titles and handles user interaction when the user clicks on a pop-up menu
NewMenu2$3E0FAllocates space for a menu list and its items
InsertMItem2$3F0FInserts an item into a menu after a specified menu item or at the top of the menu
SetMenuTitle2$400FSpecifies the title of a menu
SetMItem2$410FSpecifies the title of a menu item
SetMItemName2$420FSpecifies the name of a menu item
NewMenuBar2$430FCreates a menu bar using a menu bar template as its input specification
GetResMTitle$440FReturns pointer to the menu title (undocumented?)
HideMenuBar$450FHides the system menu bar by adding the menu bar to the desktop region
ShowMenuBar$460FReveals the system menu bar by subtracting the menu bar from the desktop region, setting visible, and updating SCBs
SetMItemIcon$470FSet the ItemIconRef field in the itemStruct record for the menu item indicated
GetMItemIcon$480FReturns the reference to the icon associated with menu item indicated
SetMItemStruct$490FSets the ItemTitleRef field of the item record to the reference for the itemStruct record passed
GetMItemStruct$4A0FReturns the reference to the itemStruct record of the menu item specified
RemoveMItemStruct$4B0FRemoves the itemStruct record from the item record
GetMItemFlag2$4C0FReturns the itemFlag2 field for the itemStruct record associated with the menu item indicated
SetMItemFlag2$4D0FSets the itemFlag2 field for the itemStruct record of the indicated menu item to the value passed
GetMItemWidth$4E0FComputes the default size of a specified menu item (undocumented?)
GetMItemBlink$4F0FGetMItemBlink returns the current menu item blink setting, as set with SetMItemBlink
InsertPathMItem$500FTakes a GS/OS pathname and inserts one menu item into the specified menu for each segment of the pathname

Menu Manager Calls


$010F

MenuBootInit

Initializes the Menu Manager; called only by Tool Locator - not by application

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C

Call must not be made by an application.

Docs

1️⃣




$020F

MenuStartUp

Starts up the Menu Manager for use by an application

Parameters
Stack before call
previous contents
userIDWord — ID assigned to the application
dPageAddrWord — Bank $0 starting address for one page of direct-page space
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void MenuStartUp(userID,dPageAddr) 
Docs

1️⃣




$030F

MenuShutDown

Shuts down the Menu Manager when an application quits

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void MenuShutDown() 
Docs

1️⃣




$040F

MenuVersion

Returns the version number of the Menu Manager

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
versionInfoWord — Version number of Menu Manager
SP
Errors

None

C
extern pascal Word MenuVersion() 
Docs

1️⃣




$050F

MenuReset

Resets the Menu Manager; called only when system reset - not by application

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C

Call must not be made by an application.

Docs

1️⃣




$060F

MenuStatus

Indicates whether the Menu Manager is active

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
activeFlagWord — BOOLEAN; TRUE if Menu Manager is active; FALSE if not
SP
Errors

None

C
extern pascal Boolean MenuStatus() 
Docs

1️⃣




$090F

MenuKey

Maps a character to the associated menu and item for that character

Parameters
Stack before call
previous contents
taskRecPtr Long — POINTER to a task record containing character to check
 
barHandle Long — HANDLE to menu bar, or 0 for system menu bar
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void MenuKey(taskRecPtr,barHandle) 
Docs

1️⃣




$0A0F

GetMenuBar

Returns the handle of the current menu bar

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
barHandle Long — HANDLE to current menu bar
 
SP
Errors

None

C
extern pascal CtlRecHndl GetMenuBar() 
Docs

1️⃣




$0B0F

MenuRefresh

Attempts to refresh the screen.

Parameters
Stack before call
previous contents
redrawRoutinePtr Long — POINTER to redraw routine in the application
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void MenuRefresh(redrawRoutinPtr) 
Docs

1️⃣




$0C0F

FlashMenuBar

Flashes the entire current menu bar

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void FlashMenuBar() 
Docs

1️⃣




$0D0F

InsertMenu

Inserts a specified menu into the menu list after a specified menu item or at front of list

Parameters
Stack before call
previous contents
addMenuHandle Long — HANDLE to menu to insert
 
insertAfterWord — Menu is inserted after this menu; if 0, menu inserted at front
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void InsertMenu(addMenuHandle,insertAfter) 
Docs

1️⃣




$0E0F

DeleteMenu

Removes a specified menu from the menu list

Parameters
Stack before call
previous contents
menuNumWord — ID of menu to be deleted
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void DeleteMenu(menuNum) 
Docs

1️⃣




$0F0F

InsertMItem

Inserts a menu item into a menu after a specified menu item or at the front of the list

Parameters
Stack before call
previous contents
addItemPtr Long — POINTER to item to insert
 
insertAfterWord — Item after which item is inserted; 0 to add to front, $FFFF at end
menuNumWord — Menu ID of menu to contain new item, 0 for first menu
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void InsertMItem(additemPtr,insertAfter,menuNum) 
Docs

1️⃣




$100F

DeleteMItem

Removes a specified item from the current menu

Parameters
Stack before call
previous contents
itemNumWord — Item ID of item to be deleted
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void DeleteMItem(itemNum) 
Docs

1️⃣




$110F

GetSysBar

Returns the handle of the current system menu bar

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
barHandle Long — HANDLE to current system bar
 
SP
Errors

None

C
extern pascal CtlRecHndl GetSysBar() 
Docs

1️⃣




$120F

SetSysBar

Sets a new system bar; the system menu bar becomes the current menu bar

Parameters
Stack before call
previous contents
barHandle Long — HANDLE to new system bar
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetSysBar(barHandle) 
Docs

1️⃣




$130F

FixMenuBar

Computes standard sizes for the menu bar and menus

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
menuHghtWord — Height of the menu bar
SP
Errors

None

C
extern pascal Word FixMenuBar() 
Docs

1️⃣




$140F

CountMItems

Returns the number of items, including any dividing lines, in a specified menu

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
menuNumWord — Menu ID of menu whose items will be counted
SP
Stack after call
previous contents
numberItemsWord — Number of items in the menu
SP
Errors

None

C
extern pascal Word CountMItems(menuNum) 
Docs

1️⃣




$150F

NewMenuBar

Creates a default menu bar with no menus

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
theWindowPtr Long — POINTER to window's GrafPort; NIL if system
 
SP
Stack after call
previous contents
barHandle Long — HANDLE to menu bar
 
SP
Errors

None

C
extern pascal CtlRecHndl NewMenuBar(theWindowPtr) 
Docs

1️⃣




$160F

GetMHandle

Returns a handle to a menu record

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
menuNumWord — Menu whose handle will be returned
SP
Stack after call
previous contents
menuHandle Long — HANDLE to specified menu; 0 if menu not found
 
SP
Errors

None

C
extern pascal CtlRecHndl GetMHandle(menuNum) 
Docs

1️⃣




$170F

SetBarColors

Sets the normal, inverse, and outline colors of the current menu bar

Parameters
Stack before call
previous contents
newBarColorWord — Normal color (see Toolbox Ref Vol1, Table 13-11)
newInvertColorWord — Selected color (see Toolbox Ref Vol1, Table 13-11)
newOutColorWord — Outline color (see Toolbox Ref Vol1, Table 13-11)
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetBarColors(newBarcolor,newInvertColor,newOutColor) 
Docs

1️⃣




$180F

GetBarColors

Returns the colors for the current menu bar

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
menuBarColor Long — Current menu bar colors (see Toolbox Ref Vol1, Table 13-10)
 
SP
Errors

None

C
extern pascal LongWord GetBarColors() 
Docs

1️⃣




$190F

SetMTitleStart

Sets the starting position for the leftmost title within the current menu bar

Parameters
Stack before call
previous contents
xStartWord — Starting position of first title from left in pixels (0-127)
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetMTitleStart(xStart) 
Docs

1️⃣




$1A0F

GetMTitleStart

Returns the starting position of the leftmost title within the current menu bar

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
xStartWord — Starting position of first title in number of pixels from left
SP
Errors

None

C
extern pascal Word GetMTitleStart() 
Docs

1️⃣




$1B0F

GetMenuMgrPort

Returns a pointer to the Menu Manager's port

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
menuMgrPtr Long — POINTER to Menu Manager port
 
SP
Errors

None

C
extern pascal GrafPortPtr GetMenuMgrPort() 
Docs

1️⃣




$1C0F

CalcMenuSize

Sets menu dimensions, either manually or automatically

Parameters
Stack before call
previous contents
newWidthWord — Menu width in pixels, or 0 for automatic calculation
newHeightWord — Menu height in pixels, or 0 for automatic calculation
menuNumWord — ID number of the menu whose width and height will be calculated
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void CalcMenuSize(newWidth,newHeight,menuNum) 
Docs

1️⃣




$1D0F

SetMTitleWidth

Sets the width of a title

Parameters
Stack before call
previous contents
newWidthWord — Width of title in pixels
menuNumWord — Number of menu whose width will be set
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetMTitleWidth(newWidth,menuNum) 
Docs

1️⃣




$1E0F

GetMTitleWidth

Returns the width of a menu title

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
menuNumWord — Number of menu whose title width will be returned
SP
Stack after call
previous contents
currentWidthWord — Width of the title in pixels
SP
Errors

None

C
extern pascal Word GetMTitleWidth(menuNum) 
Docs

1️⃣




$1F0F

SetMenuFlag

Sets the menu to a specified state

Parameters
Stack before call
previous contents
newValueWord — New bit value to set (see Toolbox Ref Vol1, Table 13-8)
menuNumWord — Number of menu whose state will be set
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetMenuFlag(newValue,menuNum) 
Docs

1️⃣




$200F

GetMenuFlag

Returns the menu flag for a specified menu

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
menuNumWord — Number of menu whose state will be returned
SP
Stack after call
previous contents
menuStateWord — Current state of menu bar ctlFlag
SP
Errors

None

C
extern pascal Word GetMenuFlag(menuNum) 
Docs

1️⃣




$210F

SetMenuTitle

Specifies the title for a menu

Parameters
Stack before call
previous contents
newStrPtr Long — POINTER to string to become new title
 
menuNumWord — Number of menu whose title will be set
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetMenuTitle(newStrPtr,menuNum) 
Docs

1️⃣




$220F

GetMenuTitle

Returns a pointer to the title of a menu

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
menuNumWord — Number of menu whose title pointer will be returned
SP
Stack after call
previous contents
menuTitlePtr Long — POINTER to the title of the menu
 
SP
Errors

None

C
extern pascal Pointer GetMenuTitle(menuNum) 
Docs

1️⃣




$230F

MenuGlobal

Turns menu help on/off or returns state of menu help; help user know inactive to active

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
menuGlobalMaskWord — Global mask (see Toolbox Ref Vol1, Table 13-6)
SP
Stack after call
previous contents
menuGlobalFlagWord — Current state of menu global flag (see Toolbox Ref Vol1, Table 13-7)
SP
Errors

None

C
extern pascal Word MenuGlobal(menuGlobalMask) 
Docs

1️⃣




$240F

SetMItem

Specifies the name for a menu item by pointing to an item line

Parameters
Stack before call
previous contents
newItemLinePtr Long — POINTER to an item line
 
itemNumWord — Number of item whose name will be set
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetMItem(newItemLinePtr,itemNum) 
Docs

1️⃣




$250F

GetMItem

Returns a pointer to the name of an item

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
itemNumWord — Number of item whose name pointer will be returned
SP
Stack after call
previous contents
itemNamePtr Long — POINTER to the name of the item
 
SP
Errors

None

C
extern pascal Pointer GetMItem(itemNum) 
Docs

1️⃣




$260F

SetMItemFlag

Sets specified item number to be underlined or not underlined & sets the highlighting style

Parameters
Stack before call
previous contents
newValueWord — New bits to set (see Toolbox Ref Vol1, Table 13-9)
itemNumWord — Number of item whose text style will be set
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetMItemFlag(newValue,itemNum) 
Docs

1️⃣




$270F

GetMItemFlag

Returns values for a specified item, such as whether it is disabled, underlined or highlighted

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
itemNumWord — Number of item whose flag will be returned
SP
Stack after call
previous contents
itemFlagWord — Values for flag (see Toolbox Ref Vol1, Table 13-9 in the section "SetMitemFlag")
SP
Errors

None

C
extern pascal Word GetMItemFlag(itemNum) 
Docs

1️⃣




$280F

SetMItemBlink

Determines how many times all menu items should blink when selected

Parameters
Stack before call
previous contents
countWord — Number of times any item should blink when selected
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetMItemBlink(count) 
Docs

1️⃣




$290F

MenuNewRes

Adjusts screen resolution and redraws the current system menu bar

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void MenuNewRes() 
Docs

1️⃣




$2A0F

DrawMenuBar

Draws the current menu bar, along with any menu titles on the bar

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void DrawMenuBar() 
Docs

1️⃣




$2B0F

MenuSelect

Draws highlighted titles, pulls down menus, and handles user interaction when a mouse button is clicked on a menu bar (see FindWindow routine if using Window Manager).

Parameters
Stack before call
previous contents
taskRecPtr Long — POINTER to a task record containing button-down point
 
barHandle Long — HANDLE to menu bar; 0 for system menu bar
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void MenuSelect(taskRecPtr,barHandle) 
Docs

1️⃣




$2C0F

HiliteMenu

Highlights or unhighlights the title of a specified menu

Parameters
Stack before call
previous contents
hiliteFlagWord — BOOLEAN; FALSE to draw normally, TRUE to highlight title
menuNumWord — ID of menu
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void HiliteMenu(hiliteFlag,menuNum) 
Docs

1️⃣




$2D0F

NewMenu

Allocates space for a menu list and its items

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
menuStringPtr Long — POINTER to an array of menu lines and item lines
 
SP
Stack after call
previous contents
menuHandle Long — HANDLE to menu; 0 if error
 
SP
Errors

None

C
extern pascal CtlRecHndl NewMenu(menuStringPtr) 
Docs

1️⃣




$2E0F

DisposeMenu

Frees the memory allocated by NewMenu

Parameters
Stack before call
previous contents
menuHandle Long — HANDLE to menu list to be discarded
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void DisposeMenu(menuHandle) 
Docs

1️⃣




$2F0F

InitPalette

Reinitializes the palettes needed for the colored Apple logo in system menu bar (changes SCB for lines 2 through 9 to the first color from color tables 1 through 6)

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void InitPalette() 
Docs

1️⃣




$300F

EnableMItem

Sets a specified menu item to display normally and allows it to be selected

Parameters
Stack before call
previous contents
itemNumWord — Number of item to be enabled
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void EnableMItem(itemNum) 
Docs

1️⃣




$310F

DisableMItem

Sets specified menu item to display in dimmed characters & does not allow it to be selected

Parameters
Stack before call
previous contents
itemNumWord — Number of item to be disabled
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void DisableMItem(itemNum) 
Docs

1️⃣




$320F

CheckMItem

Sets specified menu item to display or to not display a check mark to the left of the item

Parameters
Stack before call
previous contents
checkedFlagWord — BOOLEAN; TRUE to check item; FALSE to uncheck item
itemNumWord — Number of item to be checked or unchecked
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void CheckMItem(checkedFlag,itemNum) 
Docs

1️⃣




$330F

SetMItemMark

Sets a specified menu item to display or to not display a specified character to the left of item

Parameters
Stack before call
previous contents
markWord — Character to mark item with or 0 for no mark
itemNumWord — Number of item to be marked or unmarked
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetMItemMark(mark,itemNum) 
Docs

1️⃣




$340F

GetMItemMark

Returns the current character that is displayed to the left of a specified menu item

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
itemNumWord — Number of item to be marked or unmarked
SP
Stack after call
previous contents
markWord — Character marking item; 0 if no mark
SP
Errors

None

C
extern pascal Word GetMItemMark(itemNum) 
Docs

1️⃣




$350F

SetMItemStyle

Sets the text style for a specified menu item

Parameters
Stack before call
previous contents
textStyleWord — Text style (see Toolbox Ref Vol1, Figure 13-12)
itemNumWord — Number of item whose text style will be set
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetMItemStyle(textStyle,itemNum) 
Docs

1️⃣




$360F

GetMItemStyle

Returns the text style for a specified menu item

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
itemNumWord — Number of item whose text style will be returned
SP
Stack after call
previous contents
markWord — Text style (see Toolbox Ref Vol1, Figure 13-12 section "SetMItemStyle")
SP
Errors

None

C
extern pascal TextStyle GetMItemStyle(itemNum) 
Docs

1️⃣




$370F

SetMenuID

Specifies a new menu number

Parameters
Stack before call
previous contents
newMenuNumWord — New menu number for the menu
curMenuNumWord — Current menu number whose ID will be changed
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetMenuID(newMenuNum,curMenuNum) 
Docs

1️⃣




$380F

SetMItemID

Specifies the ID number of a menu item

Parameters
Stack before call
previous contents
newItemNumWord — New ID number to be assigned to the item
curItemNumWord — Current item whose ID will be changed
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetMItemID(newItemNum,curItemNum) 
Docs

1️⃣




$390F

SetMenuBar

Sets the current menu bar

Parameters
Stack before call
previous contents
barHandle Long — HANDLE to new current bar; 0 for system menu bar
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetMenuBar(barHandle) 
Docs

1️⃣




$3A0F

SetMItemName

Specifies the aname of a menu item by pointing to a Pascal-type string

Parameters
Stack before call
previous contents
strPtr Long — POINTER to a Pascal-type string (length in first byte)
 
itemNumWord — Number of item whose name will be set
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetMItemName(strPtr,itemNum) 
Docs

1️⃣




$3B0F

GetPopUpDefProc

Returns a pointer to the control definition procedure for pop-up menus (called during Control Manager startup) - application should not call

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
defProcPtr Long — Pointer to control procedure
 
SP
Errors

None

C
extern pascal Pointer GetPopUpDefProc() 
Docs

3️⃣




$3C0F

PopUpMenuSelect

Draws highlighted titles and handles user interaction when the user clicks on a pop-up menu

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
selectionWord — Item ID of current menu selection
currentLeftWord — Global coordinate value of left edge of pop-up menu
currentTopWord — Global coordinate value of top of current selection
flagWord — Flag word for call
menuHandle Long — Menu Handle
 
SP
Stack after call
previous contents
itemIDWord — Item ID of new selection (0 if none)
SP
Errors

None

C
extern pascal Word PopUpMenuSelect(selection,currentLeft,currentTop,flag,menuHandle) 
Docs

3️⃣




$3E0F

NewMenu2

Allocates space for a menu list and its items

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
refDescWord — Defines type of reference in menuTRef
menuTRef Long — Reference to menu template
 
SP
Stack after call
previous contents
menuHandle Long — HANDLE for new menu
 
SP
Errors

None

C
extern pascal Long NewMenu2(refDesc,menuTRef) 
Docs

3️⃣




$3F0F

InsertMItem2

Inserts an item into a menu after a specified menu item or at the top of the menu

Parameters
Stack before call
previous contents
refDescWord — Defines type of reference in menuItemTRef
menuItemTRef Long — Reference to menu item template
 
insertAfterWord — ID of item after which to insert this item
menuNumWord — ID of menu after which to insert this item
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void InsertMItem2(refDesc,menuItemTRef,insertAfter,menuNum) 
Docs

3️⃣




$400F

SetMenuTitle2

Specifies the title of a menu

Parameters
Stack before call
previous contents
refDescWord — Defines type of reference in titleRef
titleRef Long — Reference to title string of menu
 
menuNumWord — ID of menu to receive title
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetMenuTitle2(refDesc,titleRef,menuNum) 
Docs

3️⃣




$410F

SetMItem2

Specifies the title of a menu item

Parameters
Stack before call
previous contents
refDescWord — Defines type of reference in menuItemTRef
menuItemTRef Long — Reference to menu item template
 
menuItemIDWord — ID of item to be changed
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetMItem2(refDesc,menuItemTRef,menuItemID) 
Docs

3️⃣




$420F

SetMItemName2

Specifies the name of a menu item

Parameters
Stack before call
previous contents
refDescWord — Defines type of reference in titleRef
titleRef Long — Reference to menu item title
 
menuItemIDWord — ID of item to be changed
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetMItemName2(refDesc,titleRef,menuItemID) 
Docs

3️⃣




$430F

NewMenuBar2

Creates a menu bar using a menu bar template as its input specification

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
refDescWord — Defines type of reference in menuBarTRef
menuBarTRef Long — Reference to menu bar template
 
windowPtr Long — POINTER to window's GrafPort; NIL if system menu bar
 
SP
Stack after call
previous contents
menuBarHandle Long — HANDLE for new menu bar
 
SP
Errors

None

C
extern pascal Long NewMenuBar2(refDesc,menuBarTRef,windowPtr) 
Docs

3️⃣




$440F

GetResMTitle

Returns pointer to the menu title (undocumented?)






$450F

HideMenuBar

Hides the system menu bar by adding the menu bar to the desktop region

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void HideMenuBar() 
Docs

3️⃣




$460F

ShowMenuBar

Reveals the system menu bar by subtracting the menu bar from the desktop region, setting visible, and updating SCBs

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void ShowMenuBar() 
Docs

3️⃣




$470F

SetMItemIcon

Set the ItemIconRef field in the itemStruct record for the menu item indicated

Parameters
Stack before call
previous contents
iconDescWord — Describes how icon is to be referenced
iconRef Long — Reference to icon
 
itemIDWord — ID of menu item
SP
Stack after call
previous contents
SP
Errors
$0F03    menuNoStruct            Returned if bit 10 of itemFlag is not set
C
extern pascal void SetMItemIcon(iconDesc,iconRef,itemID) 
Docs

📕




$480F

GetMItemIcon

Returns the reference to the icon associated with menu item indicated

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
itemIDWord — ID of menu item
SP
Stack after call
previous contents
iconRef Long — Reference to icon
 
SP
Errors

None

C
extern pascal Ref GetMItemIcon(itemID) 
Docs

📕




$490F

SetMItemStruct

Sets the ItemTitleRef field of the item record to the reference for the itemStruct record passed

Parameters
Stack before call
previous contents
itemStructDescWord — Describes how itemStruct is to be referenced
itemStructRef Long — Reference to itemStruct
 
itemIDWord — ID of menu item
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetMItemStruct(itemStructDesc,itemStructRef,itemID) 
Docs

📕




$4A0F

GetMItemStruct

Returns the reference to the itemStruct record of the menu item specified

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
itemIDWord — ID of menu item
SP
Stack after call
previous contents
itemStructRef Long — Reference to itemStruct
 
SP
Errors

None

C
extern pascal Ref GetMItemStruct(itemID) 
Docs

📕




$4B0F

RemoveMItemStruct

Removes the itemStruct record from the item record

Parameters
Stack before call
previous contents
itemIDWord — ID of menu item
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void RemoveMItemStruct(itemID) 
Docs

📕




$4C0F

GetMItemFlag2

Returns the itemFlag2 field for the itemStruct record associated with the menu item indicated

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
itemIDWord — ID of menu item
SP
Stack after call
previous contents
itemFlagWord — itemFlag2 field from itemStruct
SP
Errors
$0F03    menuNoStruct            Returned if bit 10 of itemFlag is not set
C
extern pascal Word GetMItemFlag2(itemID) 
Docs

📕




$4D0F

SetMItemFlag2

Sets the itemFlag2 field for the itemStruct record of the indicated menu item to the value passed

Parameters
Stack before call
previous contents
newValueWord — New value for itemFlag2
itemIDWord — ID of menu item
SP
Stack after call
previous contents
SP
Errors
$0F03    menuNoStruct            Returned if bit 10 of itemFlag is not set
C
extern pascal void SetMItemFlag2(newValue,itemID) 
Docs

📕




$4E0F

GetMItemWidth

Computes the default size of a specified menu item (undocumented?)






$4F0F

GetMItemBlink

GetMItemBlink returns the current menu item blink setting, as set with SetMItemBlink

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
countWord — Menu item blink setting
SP
Errors

None

C
extern pascal Word GetMItemBlink() 
Docs

📕




$500F

InsertPathMItem

Takes a GS/OS pathname and inserts one menu item into the specified menu for each segment of the pathname

Parameters
Stack before call
previous contents
flagsWord — Flags
pathPtr Long — POINTER to GS/OS input filename
 
deviceNumWord — Device number the path is on, if known
menuIDWord — Menu ID of the menu to insert into
afterIDWord — Menu item ID of the item to insert after
startingIDWord — Menu item ID to use for the first item inserted
resultPtr Long — POINTER to the result buffer
 
SP
Stack after call
previous contents
SP
Errors
Memory Manager errors            Returned unchanged
C
extern pascal void InsertPathMItems(flags,pathPtr,deviceNum,menuID,afterID,startingID,resultPtr) 
Docs

📕








Control Manager




Control Manager Calls
Routine#Description
CtlBootInit$0110Initializes the Control Manager; called only by Tool Locator (not application)
CtlStartUp$0210Starts up the Control Manager for use by an application
CtlShutDown$0310Shuts down the Control Manager
CtlVersion$0410Returns the version number of the Control Manager
CtlReset$0510Resets the Control Manager; called only on reset (not by application)
CtlStatus$0610Indicates whether the Control Manager is active
NewControl$0910Creates a control, adds it to beginning of specified window's control list, and returns handle to new control
DisposeControl$0A10Deletes a specified control from its window's control list, releases its memory and any associated data structures.
KillControls$0B10Disposes of all controls associated with a specified window
SetCtlTitle$0C10Sets a specified control's title to a given string and redraws the control
GetCtlTitle$0D10Returns value in specified control's ctlData field, so scrollbars = view and data size, for ctrls w/titles = ptr to title str, or custom.
HideControl$0E10Makes a specified control invisible by filling the region the control occupies with the background pattern of the window's GrafPort.
ShowControl$0F10Makes a specified control visible
DrawControls$1010Draws all controls currently visible in a specified window
HiliteControl$1110Changes the way a specified control is highlighted
CtlNewRes$1210Reinitializes resolution and mode. Call after you have changed the video modes.
FindControl$1310Reports which of window's controls, if any, the cursor was in when user pressed mouse button.
TestControl$1410Tests which part of a specified control contains a specified point (if specified control is visible and active)
TrackControl$1510Follows mouse movements and responds appropriately until mouse button is released
MoveControl$1610Moves a specified control to a new location within its window
DragControl$1710Pulls dotted outln of ctrl around screen, following mvments of mouse till button released
SetCtlIcons$1810Replaces current icon font with a specified new font and returns the handle of the old font, or just returns the handle of the old font.
SetCtlValue$1910Sets specified control's ctlValue field to a specified value & redraws control to reflect new setting
GetCtlValue$1A10Returns a specified control's current ctlValue field
SetCtlParams$1B10Sets new params in controls's definition procedure, which will set values & redraw control if necessary
GetCtlParams$1C10Returns a specified control's additional parameters
DragRect$1D10Pulls a dotted outline of a specified rectangle around the screen, following the mouse movements until the mouse button is released
GrowSize$1E10Returns the height & width of size box control, using Control Manager's current icon font
GetCtlDPage$1F10Returns the value of the Control Manager's direct page
SetCtlAction$2010Sets a specified control's ctrlAction field to a new action
GetCtlAction$2110Returns the current value of a specified control's ctlAction field
SetCtlRefCon$2210Sets a specified control's ctlRefCon field to a new value
GetCtlRefCon$2310Returns the current value of a specified control's ctlRefCon field
EraseControl$2410Makes specified control invisible but doesn't add control's enclosing rectangle to window update region
DrawOneCtl$2510Draws a specified control
FindTargetCtl$2610Returns the handle of the target control within the control list for the active window
MakeNextCtlTarget$2710Makes the next eligible control the target control
MakeThisCtlTarget$2810Makes the specified control the target
SendEventToCtl$2910Passes a specified extended task record to the appropriate control or controls
GetCtlID$2A10Returns the ctlID field from the control record of a specified control
SetCtlID$2B10Sets the ctlID field in the control record of a specified control
CallCtlDefProc$2C10Calls a control's definition procedure with the specified inputs
NotifyCtls$2D10Calls control definition procedures for extended controls in a specified window, sending a control message and parameter.
GetCtlMoreFlags$2E10Gets the contents of the ctlMoreFlags field of the control record for a specified control
SetCtlMoreFlags$2F10Sets the contents of the ctlMoreFlags field of the control record for a specified control
GetCtlHandleFromID$3010Retrieves the control handle to the control record with a specified ctlID field value
NewControl2$3110Creates one or more new controls.
CMLoadResource$3210This is an entry point to the internal Control Manager routine that loads resources.
CMReleaseResource$3310This is an entry point to the internal Control Manager routine that releases resources
SetCtlParamPtr$3410Sets the pointer to the current text substitution array for the Control Manager.
GetCtlParamPtr$3510Retrieves the pointer to the current text substitution array for the Control Manager
FutzCtls$3610Invalidates bound rects of a window's normal controls and tells other controls that window state has change (undocumented?)
InvalCtls$3710Invalidates all rectangles for all controls in a specified window
CMUnloadSegment$3810Unloads any dynamic segments that have been loaded in the course of using the tool (undocumented?)
FindRadioButton$3910Returns a value indicating which radio button is selected in a given family
SetLETextByID$3A10Sets the text of an Edit Line control to a string supplied by the caller
GetLETextByID$3B10Returns the text of an Edit Line control into a buffer supplied by the caller
SetCtlValueByD$3C10Sets the value of the control that has the specified control ID in the specified window
GetCtlValueByID$3D10Returns the current value of the control that has the specified control ID in the specified window
InvalOneCtlByID$3E10Invalidates a control's rectangle, just as if you called InvalRect on the control's rectangle
HiliteCtlByID$3F10Changes the way a specified control is highlighted, just as if you called HiliteControl

Control Manager Calls


$0110

CtlBootInit

Initializes the Control Manager; called only by Tool Locator (not application)

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C

Call must not be made by an application.

Docs

1️⃣




$0210

CtlStartUp

Starts up the Control Manager for use by an application

Parameters
Stack before call
previous contents
userIDWord — ID assigned to the application
dPageAddrWord — Bank $0 starting address for one page of direct-page space
SP
Stack after call
previous contents
SP
Errors
$1001    wmNotStartedUp          The Window Manager is not initialized
C
extern pascal void CtlStartUp(userID,dPageAddr) 
Docs

1️⃣




$0310

CtlShutDown

Shuts down the Control Manager

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void CtlShutDown() 
Docs

1️⃣




$0410

CtlVersion

Returns the version number of the Control Manager

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
versionInfoWord — Version number of the Control Manager
SP
Errors

None

C
extern pascal Word CtlVersion() 
Docs

1️⃣




$0510

CtlReset

Resets the Control Manager; called only on reset (not by application)

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C

Call must not be made by an application.

Docs

1️⃣




$0610

CtlStatus

Indicates whether the Control Manager is active

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
activeFlagWord — BOOLEAN; TRUE if Control Manager is active, FALSE if not
SP
Errors

None

C
extern pascal Boolean CtlStatus() 
Docs

1️⃣




$0910

NewControl

Creates a control, adds it to beginning of specified window's control list, and returns handle to new control

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
theWindowPtr Long — POINTER to window owner
 
boundsRectPtr Long — POINTER to RECT data structure defining enclosing rectangle
 
titlePtr Long — POINTER to title string (ctlData)
 
flagWord — Bit flag (see Toolbox Ref Vol1, Figure 4-26)
valueWord — Control's starting value
param1Word — Additional parameter (view size for scroll bars)
param2Word — Additional parameter (data size for scroll bars)
defProcPtr Long — POINTER to definition procedure, or standard control value
 
refCon Long — Reserved for application use
 
colorTablePtr Long — POINTER to control's color table; NIL for default color table
 
SP
Stack after call
previous contents
theControlHandle Long — HANDLE to control; NIL = error
 
SP
Errors

None

C
extern pascal CtlRecHndl NewControl(theWindowPtr,boundsRectPtr,titlePtr,flag,value,paraml,param2,defProcPtr,refCon,colorTablePtr 
Docs

1️⃣




$0A10

DisposeControl

Deletes a specified control from its window's control list, releases its memory and any associated data structures.

Parameters
Stack before call
previous contents
theControlHandle Long — HANDLE to control
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void DisposeControl(theControlHandle) 
Docs

1️⃣




$0B10

KillControls

Disposes of all controls associated with a specified window

Parameters
Stack before call
previous contents
theWindowPtr Long — POINTER to window whose controls are to be disposed of
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void KillControls(theWindowPtr) 
Docs

1️⃣




$0C10

SetCtlTitle

Sets a specified control's title to a given string and redraws the control

Parameters
Stack before call
previous contents
titlePtr Long — POINTER to control's ctlData field
 
theControlHandle Long — HANDLE to control
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetCtlTitle(titlePtr,theControlHandle) 
Docs

1️⃣




$0D10

GetCtlTitle

Returns value in specified control's ctlData field, so scrollbars = view and data size, for ctrls w/titles = ptr to title str, or custom.

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
theControlHandle Long — HANDLE to control
 
SP
Stack after call
previous contents
ctlTitlePtr Long — POINTER to control's ctlData field
 
SP
Errors

None

C
extern pascal Pointer GetCtlTitle(theControlHandle) 
Docs

1️⃣




$0E10

HideControl

Makes a specified control invisible by filling the region the control occupies with the background pattern of the window's GrafPort.

Parameters
Stack before call
previous contents
theControlHandle Long — HANDLE to control to be hidden
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void HideControl(theControlHandle) 
Docs

1️⃣




$0F10

ShowControl

Makes a specified control visible

Parameters
Stack before call
previous contents
theControlHandle Long — HANDLE to control to be hidden
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void ShowControl(theControlHandle) 
Docs

1️⃣




$1010

DrawControls

Draws all controls currently visible in a specified window

Parameters
Stack before call
previous contents
theWindowPtr Long — HANDLE to window whose controls are to be drawn
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void DrawControls(theWindowPtr) 
Docs

1️⃣




$1110

HiliteControl

Changes the way a specified control is highlighted

Parameters
Stack before call
previous contents
hiliteStateWord — Type of highlighting: 0 = none, 1-253 = part code, 255 = inactive
theControlHandle Long — HANDLE to control to be highlighted
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void HiliteControl(hiliteState,theControlHandle) 
Docs

1️⃣




$1210

CtlNewRes

Reinitializes resolution and mode. Call after you have changed the video modes.

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void CtlNewRes() 
Docs

1️⃣




$1310

FindControl

Reports which of window's controls, if any, the cursor was in when user pressed mouse button.

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
foundCtlPtr Long — POINTER to address where handle of found control will be stored
 
pointXWord — X coordinate to check, in global coordinates
pointYWord — Y coordinate to check, in global coordinates
theWindowPtr Long — POINTER to window to check
 
SP
Stack after call
previous contents
foundPartWord — Part code of found part of control
SP
Errors

None

C
extern pascal Word FindControl(foundCtlPtr,pointX,pointY,theWindowPtr) 
Docs

1️⃣




$1410

TestControl

Tests which part of a specified control contains a specified point (if specified control is visible and active)

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
pointXWord — X coordinate to check, in global coordinates
pointYWord — Y coordinate to check, in global coordinates
theControlHandle Long — HANDLE of control to be tested
 
SP
Stack after call
previous contents
partCodeWord — Part code of the POINT; 0 if not in visible, active control
SP
Errors

None

C
extern pascal Word TestControl(pointX,pointY,theControlHandle) 
Docs

1️⃣




$1510

TrackControl

Follows mouse movements and responds appropriately until mouse button is released

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
startXWord — X coordinate, in global coordinates, of starting point
startYWord — Y coordinate, in global coordinates, of starting point
actionProcPtr Long — POINTER to routine; NIL, or negative (see Toolbox Ref Vol1 Chapter4 -"Additional Actions and the Action Procedure")
 
theControlHandle Long — HANDLE to control
 
SP
Stack after call
previous contents
partCodeWord — Selected part when button was released
SP
Errors

None

C
extern pascal Word TrackControl(startX,startY,actionProcPtr,theControlHandle) 
Docs

1️⃣




$1610

MoveControl

Moves a specified control to a new location within its window

Parameters
Stack before call
previous contents
newXWord — New X origin ofcontrol, in local coordinates
newYWord — New Y origin ofcontrol, in local coordinates
theControlHandle Long — HANDLE to control
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void MoveControl(newX,newY,theControlHandle) 
Docs

1️⃣




$1710

DragControl

Pulls dotted outln of ctrl around screen, following mvments of mouse till button released

Parameters
Stack before call
previous contents
startXWord — X coordinate of starting point in local coordinates
startYWord — Y coordinate of starting point in local coordinates
limitRectPtr Long — POINTER to bounds RECT data structure
 
slopRectPtr Long — POINTER to slop RECT data structure
 
axisWord — Movement constraint: 0=none, 1=horizontal, 2=vertical
theControlHandle Long — HANDLE to control
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void DragControl(startX,startY,limitRectPtr,slopRectPtr,axis,theControlHandle) 
Docs

1️⃣




$1810

SetCtlIcons

Replaces current icon font with a specified new font and returns the handle of the old font, or just returns the handle of the old font.

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
newFontHandle Long — HANDLE to new icon font; negative value to not set new font
 
SP
Stack after call
previous contents
oldFontHandle Long — HANDLE to old icon font
 
SP
Errors

None

C
extern pascal FontHndl SetCtlIcons(newFontHandle) 
Docs

1️⃣




$1910

SetCtlValue

Sets specified control's ctlValue field to a specified value & redraws control to reflect new setting

Parameters
Stack before call
previous contents
newValueWord — New value for control
theControlHandle Long — HANDLE to control
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetCtlValue(newValue,theControlHandle) 
Docs

1️⃣




$1A10

GetCtlValue

Returns a specified control's current ctlValue field

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
theControlHandle Long — HANDLE to control
 
SP
Stack after call
previous contents
curValueWord — Control's current value
SP
Errors

None

C
extern pascal Word GetCtlValue(theControlHandle) 
Docs

1️⃣




$1B10

SetCtlParams

Sets new params in controls's definition procedure, which will set values & redraw control if necessary

Parameters
Stack before call
previous contents
param2Word — Additional control parameter; defined by control
param1Word — Additional control parameter; defined by control
theControlHandle Long — HANDLE to control
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal Word SetCtlParams(param2,param1,theControlHandle) 
Docs

1️⃣




$1C10

GetCtlParams

Returns a specified control's additional parameters

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
theControlHandle Long — HANDLE to control
 
SP
Stack after call
previous contents
param1Word — Additional control parameter; defined by control
param2Word — Additional control parameter; defined by control
SP
Errors

None

C
extern pascal LongWord GetCtlParams(theControlHandle) 
Docs

1️⃣




$1D10

DragRect

Pulls a dotted outline of a specified rectangle around the screen, following the mouse movements until the mouse button is released

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
actionProcPtr Long — POINTER to routine; NIL for default
 
dragPatternPtr Long — POINTER to pattern to use for drag outline
 
startXWord — X coordinate of starting point in local coordinates
startYWord — Y coordinate of starting point in local coordinates
dragRectPtr Long — POINTER to RECT data structure of rectangle to be dragged
 
limitRectPtr Long — POINTER to bounds RECT data structure
 
slopRectPtr Long — POINTER to slop RECT data structure
 
dragFlagWord — Bit flag that customizes DragRect (see Toolbox Ref Vol1 Figure 4-25)
SP
Stack after call
previous contents
moveDelta Long — High word = amount X changed, low word = amount Y changed
 
SP
Errors
$1001    wmNotStartedUp          The Window Manager is not initialized
C
extern pascal Longword DragRect(actionProcPtr,dragPatternPtr,startX,startY,dragRectPtr,limitRectPtr,slopRectPtr,dragFlag) 
Docs

1️⃣




$1E10

GrowSize

Returns the height & width of size box control, using Control Manager's current icon font

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
sizeOfGrow Long — High-order word is width, low-order word is height
 
SP
Errors

None

C
extern pascal Longword GrowSize() 
Docs

1️⃣




$1F10

GetCtlDPage

Returns the value of the Control Manager's direct page

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
ctlDPageWord — Bank $0 starting address of Control Manager's direct page
SP
Errors

None

C
extern pascal Word GetCtlDPage() 
Docs

1️⃣




$2010

SetCtlAction

Sets a specified control's ctrlAction field to a new action

Parameters
Stack before call
previous contents
newActionPtr Long — POINTER to custom control action procedure
 
theControlHandle Long — HANDLE to control
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetCtlAction(newActionPtr,theControlHandle) 
Docs

1️⃣




$2110

GetCtlAction

Returns the current value of a specified control's ctlAction field

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
theControlHandle Long — HANDLE to control
 
SP
Stack after call
previous contents
ctlActionValue Long — Value in control's ctlActton field
 
SP
Errors

None

C
extern pascal LongProcPtr GetCtlAction(theControlHandle) 
Docs

1️⃣




$2210

SetCtlRefCon

Sets a specified control's ctlRefCon field to a new value

Parameters
Stack before call
previous contents
newRefCon Long — Value to store in the control's ctlRefCon field
 
theControlHandle Long — HANDLE to control
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetCtlRefCon(newRefCon,theControlHandle) 
Docs

1️⃣




$2310

GetCtlRefCon

Returns the current value of a specified control's ctlRefCon field

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
theControlHandle Long — HANDLE to control
 
SP
Stack after call
previous contents
ctlRefConValue Long — Value in control's ctlRefCon field
 
SP
Errors

None

C
extern pascal Longword GetCtlRefCon(theControlHandle) 
Docs

1️⃣




$2410

EraseControl

Makes specified control invisible but doesn't add control's enclosing rectangle to window update region

Parameters
Stack before call
previous contents
theControlHandle Long — HANDLE to control to be erased
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void EraseControl(theControlHandle) 
Docs

1️⃣




$2510

DrawOneCtl

Draws a specified control

Parameters
Stack before call
previous contents
theControlHandle Long — HANDLE to control to be drawn
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void DrawOneCtl(theControlHandle) 
Docs

1️⃣




$2610

FindTargetCtl

Returns the handle of the target control within the control list for the active window

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
ctlHandle Long — Handle of target control; undefined if none or error
 
SP
Errors
$1004    noCtlError              No controls in the window
$1005    noExtendedCtlError      No extended controls in the window
$1006    noCtlTargetError        No extended control is currently the target control
$100C    noFrontWindowError      There is no front window
C
extern pascal Handle FindTargetCtl() 
Docs

3️⃣




$2710

MakeNextCtlTarget

Makes the next eligible control the target control

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
ctlHandle Long — Handle of target control; undefined if error
 
SP
Errors
$1004    noCtlError              No controls in the window
$1005    noExtendedCtlError      No extended controls in the window
$100B    noCtlToBeTargetError    No control could be made the target control
C
extern pascal Handle MakeNextCtlTarget() 
Docs

3️⃣




$2810

MakeThisCtlTarget

Makes the specified control the target

Parameters
Stack before call
previous contents
ctlToBeTarget Long — Handle to control to be made the target
 
SP
Stack after call
previous contents
SP
Errors
$1007    notExtendedCtlError     The action is valid only for extended controls
$1008    canNotBeTargetError     The specified control cannot be made the target control
C
extern pascal void MakeThisCtlTarget(ctlToBeTarget) 
Docs

3️⃣




$2910

SendEventToCtl

Passes a specified extended task record to the appropriate control or controls

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
targetOnlyFlagWord — (Boolean) TRUE = send to target only; FALSE = all controls
ctlWindowPtr Long — Pointer to window to search; NIL for top window
 
eTaskRecPtr Long — Pointer to extended task record for event
 
SP
Stack after call
previous contents
resultWord — BOOLEAN; TRUE if event accepted; otherwise FALSE
SP
Errors
$1005    noExtendedCtlError      No extended controls in the window
$100C    noFrontWindowError      There is no front window
C
extern pascal Boolean SendEventToCtl(targetOnlyFlag,ctlWindowPtr,eTaskRecPtr) 
Docs

3️⃣




$2A10

GetCtlID

Returns the ctlID field from the control record of a specified control

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
ctlHandle Long — HANDLE to control
 
SP
Stack after call
previous contents
ctlID Long — ctlID for specified control
 
SP
Errors
$1004    noCtlError              No controls in the window
$1007    notExtendedCtlError     The action is valid only for extended controls
C
extern pascal Long GetCtlID(ctlHandle) 
Docs

3️⃣




$2B10

SetCtlID

Sets the ctlID field in the control record of a specified control

Parameters
Stack before call
previous contents
newID Long — New ctlID value for the control
 
ctlHandle Long — HANDLE to control
 
SP
Stack after call
previous contents
SP
Errors
$1004    noCtlError              No controls in the window
$1007    notExtendedCtlError     The action is valid only for extended controls
C
extern pascal void SetCtlID(newID,ctlHandle) 
Docs

3️⃣




$2C10

CallCtlDefProc

Calls a control's definition procedure with the specified inputs

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
ctlHandle Long — HANDLE of control to be called
 
ctlMessageWord — Control message to send to control definition procedure
ctlParam Long — Parameter to pass to control definition procedure
 
SP
Stack after call
previous contents
result Long — Result value from control definition procedure
 
SP
Errors

None

C
extern pascal Long CallCtlDefProc(ctlHandle,ctlMessage,ctlParam) 
Docs

3️⃣




$2D10

NotifyCtls

Calls control definition procedures for extended controls in a specified window, sending a control message and parameter.

Parameters
Stack before call
previous contents
maskWord — Bit mask to be compared with ctlMoreFlags
messageWord — Control message to send to control definition procedures
param Long — Parameter to pass to control definition procedures
 
window Long — GrafPort of window whose control list is to be searched
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void NotifyCtls(mask,message,param,window) 
Docs

3️⃣




$2E10

GetCtlMoreFlags

Gets the contents of the ctlMoreFlags field of the control record for a specified control

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
ctlHandle Long — HANDLE to control
 
SP
Stack after call
previous contents
ctlMoreFlagsWord — ctlMoreFlags for specified control
SP
Errors
$1004    noCtlError              No controls in the window
$1007    notExtendedCtlError     The action is valid only for extended controls
C
extern pascal Word GetCtlMoreFlags(ctlHandle) 
Docs

3️⃣




$2F10

SetCtlMoreFlags

Sets the contents of the ctlMoreFlags field of the control record for a specified control

Parameters
Stack before call
previous contents
newMoreFlagsWord — New ctlMoreFlags value for the control
ctlHandle Long — HANDLE to control
 
SP
Stack after call
previous contents
SP
Errors
$1004    noCtlError              No controls in the window
$1007    notExtendedCtlError     The action is valid only for extended controls
C
extern pascal void SetCtlMoreFlags(newMoreFlags,ctlHandle) 
Docs

3️⃣




$3010

GetCtlHandleFromID

Retrieves the control handle to the control record with a specified ctlID field value

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
ctlWindowPtr Long — POINTER to window for control list search; NIL = top window
 
ctlID Long — ID value for desired control
 
SP
Stack after call
previous contents
ctlHandle Long — HANDLE for specified control
 
SP
Errors
$1004    noCtlError              No controls in the window
$1005    noExtendedCtlError      No extended controls in the window
$1009    noSuchIDError           The specified control ID cannot be found
$100C    noFrontWindowError      There is no front window
C
extern pascal Long GetCtlHandleFromID(ctlWindowPtr,ctlID) 
Docs

3️⃣




$3110

NewControl2

Creates one or more new controls.

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
ownerPtr Long — POINTER to window for control(s)
 
inputDescWord — Describes contents of inputRef
inputRef Long — Reference of a type defined by inputDesc
 
SP
Stack after call
previous contents
ctlHandle Long — Control handle (if single control created) or 0
 
SP
Errors

None

C
extern pascal Handle NewControl2(ownerPtr,inputDesc,inputRef) 
Docs

3️⃣




$3210

CMLoadResource

This is an entry point to the internal Control Manager routine that loads resources.

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
resourceTypeWord — Type of resource to load
resourceID Long — ID of resource to load
 
SP
Stack after call
previous contents
resourceHandle Long — Handle of loaded resource
 
SP
Errors

None

C
extern pascal Handle CMLoadResource(resourceType,resourceID) 
Docs

3️⃣




$3310

CMReleaseResource

This is an entry point to the internal Control Manager routine that releases resources

Parameters
Stack before call
previous contents
resourceTypeWord — Type of resource to load
resourceID Long — ID of resource to load
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void CMReleaseResource(resourceType,resourceID) 
Docs

3️⃣




$3410

SetCtlParamPtr

Sets the pointer to the current text substitution array for the Control Manager.

Parameters
Stack before call
previous contents
subArrayPtr Long — New pointer to text substitution array
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SetCtlParamPtr(subArrayPtr) 
Docs

3️⃣




$3510

GetCtlParamPtr

Retrieves the pointer to the current text substitution array for the Control Manager

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
subArrayPtr Long — New pointer to text substitution array
 
SP
Errors

None

C
extern pascal Pointer GetCtlParamPtr() 
Docs

3️⃣




$3610

FutzCtls

Invalidates bound rects of a window's normal controls and tells other controls that window state has change (undocumented?)

Parameters

The stack is not affected by this call. There are no input or output parameters.

C

Call must not be made by an application.






$3710

InvalCtls

Invalidates all rectangles for all controls in a specified window

Parameters
Stack before call
previous contents
ctlWindowPtr Long — POINTER to window for operation
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void InvalCtls(ctlWindowPtr) 
Docs

3️⃣




$3810

CMUnloadSegment

Unloads any dynamic segments that have been loaded in the course of using the tool (undocumented?)






$3910

FindRadioButton

Returns a value indicating which radio button is selected in a given family

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
windPtr Long — Window containing the radio buttons
 
famNumWord — Family number for the radio buttons to check
SP
Stack after call
previous contents
radioNumWord — Value indicating selected radio button
SP
Errors

None

C
extern pascal unsigned int FindRadioButton(windPtr,famNum) 
Docs

📕




$3A10

SetLETextByID

Sets the text of an Edit Line control to a string supplied by the caller

Parameters
Stack before call
previous contents
windPtr Long — Pointer to the window containing the control
 
LECtlID Long — Control ID for the LineEdit control
 
textPtr Long — Pointer to Pascal string
 
SP
Stack after call
previous contents
SP
Errors
$1004    noCtlError              No controls in the window
$1005    noExtendedCtlError      No extended controls in the window
$1009    noSuchIDError           The specified control ID cannot be found
$100C    noFrontWindowError      There is no front window
C
extern pascal void SetLETextByID(windPtr,LECtlID,textPtr) 
Docs

📕




$3B10

GetLETextByID

Returns the text of an Edit Line control into a buffer supplied by the caller

Parameters
Stack before call
previous contents
windPtr Long — Pointer to the window containing the control
 
LECtlID Long — Control ID for the LineEdit control
 
textPtr Long — POINTER to result buffer
 
SP
Stack after call
previous contents
SP
Errors
$1004    noCtlError              No controls in the window
$1005    noExtendedCtlError      No extended controls in the window
$1009    noSuchIDError           The specified control ID cannot be found
$100C    noFrontWindowError      There is no front window
C
extern pascal void GetLETextByID(windPtr,LECtlID,textPtr) 
Docs

📕




$3C10

SetCtlValueByD

Sets the value of the control that has the specified control ID in the specified window

Parameters
Stack before call
previous contents
newValueWord — New value for control
windPtr Long — Window containing the control (NIL = front)
 
ctlID Long — Control ID of the control
 
SP
Stack after call
previous contents
SP
Errors
$1004    noCtlError              No controls in the window
$1005    noExtendedCtlError      No extended controls in the window
$1009    noSuchIDError           The specified control ID cannot be found
$100C    noFrontWindowError      There is no front window
C
extern pascal void SetCtlValueByID(newValue,windPtr,ctlID) 
Docs

📕




$3D10

GetCtlValueByID

Returns the current value of the control that has the specified control ID in the specified window

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
windPtr Long — Window containing the control (NIL = front)
 
ctlID Long — Control ID of the control
 
SP
Stack after call
previous contents
theValueWord — Current control value
SP
Errors
Control Manager errors           Returned unchanged
C
extern pascal void SetCtlValueByID(newValue,windPtr,ctlID) 
Docs

📕




$3E10

InvalOneCtlByID

Invalidates a control's rectangle, just as if you called InvalRect on the control's rectangle

Parameters
Stack before call
previous contents
windPtr Long — Window containing the control (NIL = front)
 
ctlID Long — Control ID of the control
 
SP
Stack after call
previous contents
SP
Errors
Control Manager errors           Returned unchanged
C
extern pascal void InvalOneCtlByID(windPtr,ctlID) 
Docs

📕




$3F10

HiliteCtlByID

Changes the way a specified control is highlighted, just as if you called HiliteControl

Parameters
Stack before call
previous contents
hiliteStateWord — New highlight value
windPtr Long — Window containing the control (NIL = front)
 
ctlID Long — Control ID of the control
 
SP
Stack after call
previous contents
SP
Errors
Control Manager errors           Returned unchanged
C
extern pascal void HiliteCtlByID(hiliteState,windPtr,ctlID) 
Docs

📕








System Loader




System Loader Calls
Routine#Description
LoaderInit$0111Initializes System Loader Toolset; called only by the Tool Locator - not by application
LoaderStartUp$0211Starts up System Loader - This function does nothing - Do not use
LoaderShutDown$0311Shuts down System Loader - This function does nothing - Do not use
LoaderVersion$0411Returns the version number of System Loader
LoaderReset$0511Resets System Loader Toolset - This function does nothing - Do not use
LoaderStatus$0611Indicates whether System Loader Toolset is active
InitialLoad$0911Called by a controlling program (such as a shell or a switcher) to ask the System Loader to perform an initial load of a program
Restart$0A11Asks the System Loader to resurrect a dormant application - one that has been shut down (by the User Shutdown function), but is still in memory.
LoadSegNum$0B11Loads a load segment specified by load-file number, seg number, & user ID, into memory
UnloadSegNum$0C11Unloads a specific load segment from memory
LoadSegName$0D11Loads a named segment (by name) into memory, named by its load file's pathname & segment name)
UnloadSeg$0E11Unloads the load segment containing the specified address
GetLoadSegInfo$0F11Returns the Memory Segment Table entry corresponding to the specified (by #) load segment
GetUserID$1011Returns the User ID associated with the specified pathname. Allows controlling propathname. Allows controlling program to determine whether it can restart an application or must perform an initial load.
LGetPathname$1111Returns the pathname associated with the specified User ID. P16 uses this call to se application prefix (1/) for a program that is restarted from memory
UserShutdown$1211Closes down an application that has just terminated

System Loader Calls


$0111

LoaderInit

Initializes System Loader Toolset; called only by the Tool Locator - not by application

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C

Call must not be made by an application.

Docs

📘




$0211

LoaderStartUp

Starts up System Loader - This function does nothing - Do not use

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C

Call must not be made by an application.

Docs

📘




$0311

LoaderShutDown

Shuts down System Loader - This function does nothing - Do not use

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C

Call must not be made by an application.

Docs

📘




$0411

LoaderVersion

Returns the version number of System Loader

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
versionInfoWord — Version number of Tool Locator
SP
Errors

None

C
extern pascal Word LoaderVersion() 
Docs

📘




$0511

LoaderReset

Resets System Loader Toolset - This function does nothing - Do not use

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void LoaderReset() 
Docs

📘




$0611

LoaderStatus

Indicates whether System Loader Toolset is active

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
activeFlagWord — BOOLEAN; TRUE if System Loader is active, FALSE if not
SP
Errors

None

C
extern pascal Boolean LoaderStatus() 
Docs

1️⃣




$0911

InitialLoad

Called by a controlling program (such as a shell or a switcher) to ask the System Loader to perform an initial load of a program

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
wordspaceWord — Space for result
longspace Long — Space for result
 
wordspaceWord — Space for result
userIDWord — User ID consisting of TypeID and MainID fields which can also be zero (see documentation)
pathPtr Long — POINTER to pathname of file to be loaded
 
specialMemoryFlagWord — Special memory flag; if TRUE (nonzero), it will not load any static segments into special memory (banks $00 and $01)
SP
Stack after call
previous contents
dirPageStackSizeWord — Stack size in the Direct Page
dirPageStackAddrWord — Stack address in the Direct Page
startingAddress Long — Address of the loaded file
 
userIDWord — User ID that was passed in, or created by this call
SP
Errors
$1104                            The file is not a load file
$1105                            System Loader is busy
$1109                            Segment number out of sequence
$110A                            Illegal load record found
$110B                            Load segment is foreign
ProDOS 16 errors                 Returned unchanged
Memory Manager errors            Returned unchanged
C
none 
Docs

📘




$0A11

Restart

Asks the System Loader to resurrect a dormant application - one that has been shut down (by the User Shutdown function), but is still in memory.

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
wordspaceWord — Space for result
longspace Long — Space for result
 
wordspaceWord — Space for result
userIDWord — An existing, nonzero User ID must be specified (the Aux ID part is ignored).
SP
Stack after call
previous contents
dirPageStackSizeWord — Stack size in the Direct Page
dirPageStackAddrWord — Stack address in the Direct Page
startingAddress Long — Address of the loaded file
 
userIDWord — User ID that was passed in, or created by this call
SP
Errors
$1101                            Entry not found
$1105                            System Loader is busy
$1108                            User ID error
ProDOS 16 errors                 Returned unchanged
Memory Manager errors            Returned unchanged
C
none 
Docs

📘




$0B11

LoadSegNum

Loads a load segment specified by load-file number, seg number, & user ID, into memory

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
userIDWord — Caller's User ID
loadFileNumWord — The load-file number
loadSegNumWord — The load-segment number
SP
Stack after call
previous contents
segAddress Long — Address of the segment
 
SP
Errors
$1101                            Entry not found
$1102                            OMF version error
$1104                            The file is not a load file
$1105                            System Loader is busy
$1107                            File version error
$1107                            File version error
$1109                            Segment number out of sequence
$110A                            Illegal load record found
$110B                            Load segment is foreign
ProDOS 16 errors                 Returned unchanged
Memory Manager errors            Returned unchanged
C
none 
Docs

📘




$0C11

UnloadSegNum

Unloads a specific load segment from memory

Parameters
Stack before call
previous contents
userIDWord — Caller's User ID
loadFileNumWord — The load-file number
loadSegNumWord — The load-segment number
SP
Stack after call
previous contents
SP
Errors
$1101                            Entry not found
$1105                            System Loader is busy
ProDOS 16 errors                 Returned unchanged
Memory Manager errors            Returned unchanged
C
none 
Docs

📘




$0D11

LoadSegName

Loads a named segment (by name) into memory, named by its load file's pathname & segment name)

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
wordspaceWord — Space for result
wordspaceWord — Space for result
longspace Long — Space for result
 
userIDWord — User ID (if the segment should have a different User ID from the current one)
loadFileName Long — POINTER to pathname of file to be loaded
 
loadSegNameWord — POINTER to segment name to be loaded
SP
Stack after call
previous contents
loadSegNumWord — The load-segment number
loadFileNumWord — The load-file number
userIDWord — User ID that was passed in, or created by this call
segmentAddress Long — Address of the loaded segment
 
SP
Errors
$1101                            Entry not found
$1104                            The file is not a load file
$1105                            System Loader is busy
$1107                            File version error
$1109                            Segment number out of sequence
$110A                            Illegal load record found
$110B                            Load segment is foreign
ProDOS 16 errors                 Returned unchanged
Memory Manager errors            Returned unchanged
C
none 
Docs

📘




$0E11

UnloadSeg

Unloads the load segment containing the specified address

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
wordspaceWord — Space for result
wordspaceWord — Space for result
segAddress Long — Any address in memory
 
SP
Stack after call
previous contents
loadSegNumWord — The load-segment number
loadFileNumWord — The load-file number
userIDWord — User ID of the found segment
SP
Errors
$1101                            Entry not found
$1105                            System Loader is busy
ProDOS 16 errors                 Returned unchanged
Memory Manager errors            Returned unchanged
C
none 
Docs

📘




$0F11

GetLoadSegInfo

Returns the Memory Segment Table entry corresponding to the specified (by #) load segment

Parameters
Stack before call
previous contents
userIDWord — User ID
loadFileNumWord — The load-file number
loadSegNumWord — The load-segment number
bufferAddress Long — Address of user buffer for results
 
SP
Stack after call
previous contents
SP
Errors
$1101                            Entry not found
$1105                            System Loader is busy
ProDOS 16 errors                 Returned unchanged
Memory Manager errors            Returned unchanged
C
none 
Docs

📘




$1011

GetUserID

Returns the User ID associated with the specified pathname. Allows controlling propathname. Allows controlling program to determine whether it can restart an application or must perform an initial load.

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
pathPtr Long — POINTER to pathname
 
SP
Stack after call
previous contents
userIDWord — User ID
SP
Errors
$1101                            Entry not found
$1105                            System Loader is busy
ProDOS 16 errors                 Returned unchanged
Memory Manager errors            Returned unchanged
C
none 
Docs

📘




$1111

LGetPathname

Returns the pathname associated with the specified User ID. P16 uses this call to se application prefix (1/) for a program that is restarted from memory

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
userIDWord — User ID
loadFileNumWord — The load-file number
SP
Stack after call
previous contents
pathPtr Long — POINTER to pathname
 
SP
Errors
$1101                            Entry not found
$1105                            System Loader is busy
ProDOS 16 errors                 Returned unchanged
Memory Manager errors            Returned unchanged
C
none 
Docs

📘




$1211

UserShutdown

Closes down an application that has just terminated

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
userIDWord — User ID
quitFlagWord — QUIT flag (correspondes to P16 flag word parameter for quit function)
SP
Stack after call
previous contents
userIDWord — User ID
SP
Errors
$1105                            System Loader is busy
ProDOS 16 errors                 Returned unchanged
Memory Manager errors            Returned unchanged
C
none 
Docs

📘








QuickDraw Aux




QuickDraw Aux Calls
Routine#Description
QDAuxBootInit$0112Initializes QuickDraw II Auxiliary; called only by the Tool Locator - not by application
QDAuxStartUp$0212Starts up QuickDraw II Auxiliary for use by an application
QDAuxShutDown$0312Shuts down QuickDraw II Auxiliary when an application quits
QDAuxVersion$0412Returns the version number of QuickDraw II Auxiliary toolset
QDAuxReset$0512Resets QuickDraw II Auxiliary; called only when the system is reset - not by applicaiton
QDAuxStatus$0612Indicates whether QuickDraw II Auxiliary is active
CopyPixels$0912Copies pixel image from 1 place to another, w/stretch or compress to make source fit dest
WaitCursor$0A12Changes the cursor to a predefined cursor that looks like a watch
DrawIcon$0B12Draws a specified icon in a specified mode at a specified location & clips to current visible region
SpecialRect$0C12Frames and fills a rectangle in a single call, making separate calls to FrameRect and FillRect unnecessary.
SeedFill$0D12Generates a mask from a specified source image and pattern by filling outward from a starting point
CalcMask$0E12Generates a mask from a specified source image and pattern by filling inward from the boundary rectangle
GetSysIcon$0F12Returns small icons representing files, devices, and other miscellaneous icons
PixelMap2Rgn$1012Transforms a pixel map into a QuickDraw II region
IBeamCursor$1312Sets the QuickDraw II cursor to an I-beam cursor
WhooshRect$1412Animates a “zooming” effect from one rectangle to another
DrawStringWidth$1512Draws a string in a specified horizontal width on a single line
UseColorTable$1612Preserves Scanline Control Bytes (SCBs) and sets them to use a color table you specify
RestoreColorTable$1712Undoes the effects of UseColorTable
OpenPicture$B712Allocates memory for the recording of drawing commands into a picture definition, and returns picture handle. (see QuickDraw II OpenPicture call $B704)
PicComment$B812Inserts a specified comment into the currently open picture. (see QuickDraw II PicComment call $B804)
DrawPicture$BA12Takes drawing commands recorded in picture definition, maps them from picture frame into destination rect. (see QuickDraw II DrawPicture call $BA04)
KillPicture$BB12Releases all memory occupied by a specifed picture. (see QuickDraw II KillPicture call $BB04)

QuickDraw Aux Calls


$0112

QDAuxBootInit

Initializes QuickDraw II Auxiliary; called only by the Tool Locator - not by application

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C

Call must not be made by an application.

Docs

2️⃣




$0212

QDAuxStartUp

Starts up QuickDraw II Auxiliary for use by an application

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void QDAuxStartUp() 
Docs

2️⃣




$0312

QDAuxShutDown

Shuts down QuickDraw II Auxiliary when an application quits

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void QDAuxShutDown() 
Docs

2️⃣




$0412

QDAuxVersion

Returns the version number of QuickDraw II Auxiliary toolset

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
versionInfoWord — Version number of the QuickDraw Auxiliary Set
SP
Errors

None

C
extern pascal Word QDAuxVersion() 
Docs

2️⃣




$0512

QDAuxReset

Resets QuickDraw II Auxiliary; called only when the system is reset - not by applicaiton

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C

Call must not be made by an application.

Docs

2️⃣




$0612

QDAuxStatus

Indicates whether QuickDraw II Auxiliary is active

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
activeFlagWord — BOOLEAN; TRUE if QuickDraw Aux toolset is active, FALSE if not
SP
Errors

None

C
extern pascal Boolean QDAuxStatus() 
Docs

2️⃣




$0912

CopyPixels

Copies pixel image from 1 place to another, w/stretch or compress to make source fit dest

Parameters
Stack before call
previous contents
srcLocPtr Long — POINTER to locInfo record of source rectangle
 
destLocPtr Long — POINTER to locInfo record of destination rectangle
 
srcRect Long — POINTER to RECT defining source rectangle
 
destRect Long — POINTER to RECT defining destination rectangle
 
xferModeWord — Pen mode
maskRgn Long — HANDLE to mask region
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void CopyPixels(srcLocPtr,destLocPtr,srcRect,destRect,xferMode,maskRgn) 
Docs

2️⃣




$0A12

WaitCursor

Changes the cursor to a predefined cursor that looks like a watch

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void WaitCursor() 
Docs

2️⃣




$0B12

DrawIcon

Draws a specified icon in a specified mode at a specified location & clips to current visible region

Parameters
Stack before call
previous contents
iconPtr Long — POINTER to icon record (see Toolbox Ref Vol2 Figure 17-1)
 
displayModeWord — HANDLE to mask region (see Toolbox Ref Vol2 Figure 17-2)
xPosWord — X coordinate of upper left corner of icon
yPosWord — Y coordinate of upper left corner of icon
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void Drawicon(iconPtr,displayMode,xPos,yPos) 
Docs

2️⃣




$0C12

SpecialRect

Frames and fills a rectangle in a single call, making separate calls to FrameRect and FillRect unnecessary.

Parameters
Stack before call
previous contents
rectPtr Long — POINTER to rectangle to draw
 
frameColorWord — Color of rectangle frame
fillColorWord — Color of rectangle interior
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void SpecialRect(rectPtr,frameColor,fillColor) 
Docs

3️⃣




$0D12

SeedFill

Generates a mask from a specified source image and pattern by filling outward from a starting point

Parameters
Stack before call
previous contents
srcLocInfoPtr Long — POINTER to source locInfo data record
 
srcRect Long — POINTER to source rectangle data record
 
destLocInfoPtr Long — POINTER to destination locInfo data record
 
destRect Long — POINTER to destination rectangle data record
 
seedHWord — Horizontal offset (pixel) to start fill point
seedVWord — Verical offset (pixel) to start fill point
resModeWord — Resolution mode
patternPtr Long — POINTER to fill pattern
 
leakTblPtr Long — POINTER to leak-through color table
 
SP
Stack after call
previous contents
SP
Errors
$0201    memErr                  Unable to allocate memory
$1211    badRectSize             The height or width is negative, the destination rect is not the same size as the source rect, or the source or destination rect is not within its boundary
$1212    destModeError           The destMode portion of resMode is invalid
C
extern pascal void SeedFill(srcLocInfoPtr,srcRect,destLocInfoPtr,destRect,seedH,seedV,resMode,patternPtr,leakTblPtr) 
Docs

3️⃣




$0E12

CalcMask

Generates a mask from a specified source image and pattern by filling inward from the boundary rectangle

Parameters
Stack before call
previous contents
srcLocInfoPtr Long — POINTER to source locInfo data record
 
srcRect Long — POINTER to source rectangle data record
 
destLocInfoPtr Long — POINTER to destination locInfo data record
 
destRect Long — POINTER to destination rectangle data record
 
resModeWord — Resolution mode
patternPtr Long — POINTER to fill pattern
 
leakTblPtr Long — POINTER to leak-through color table
 
SP
Stack after call
previous contents
SP
Errors
$0201    memErr                  Unable to allocate memory
$1211    badRectSize             The height or width is negative, the destination rect is not the same size as the source rect, or the source or destination rect is not within its boundary
$1212    destModeError           The destMode portion of resMode is invalid
C
extern pascal void CalcMask(srcLocIinfoPtr,srcRect,destLocInfoPtr,destRect,resMode,patternPtr,leakTblPtr) 
Docs

3️⃣




$0F12

GetSysIcon

Returns small icons representing files, devices, and other miscellaneous icons

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
flagsWord — What kind of icon to get
valueWord — File type, deviceID, or index
auxValue Long — Auxiliary type of file or zero
 
SP
Stack after call
previous contents
iconPtr Long — POINTER to resulting icon
 
SP
Errors
$1230    badGetSysIconInput      No icon is available for the given input
C
extern pascal IconPtr GetSysIcon(flags,value,auxValue) 
Docs

📕




$1012

PixelMap2Rgn

Transforms a pixel map into a QuickDraw II region

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
srcLocInfo Long — POINTER to a locInfo record for the pixel map
 
bitsPerPixelWord — Number of bits per pixel (either 2 or 4)
colorsToIncludeWord — Bit flags indicating which colors to include
SP
Stack after call
previous contents
theRgn Long — HANDLE to region created from the pixel map
 
SP
Errors
$0433    rgnFull                 Region full
Memory Manager errors            Returned unchanged
C
extern pascal RgnHandle PixelMap2Rgn(srcLocInfo,bitsPerPixel,colorsToInclude) 
Docs

📕




$1312

IBeamCursor

Sets the QuickDraw II cursor to an I-beam cursor

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void IBeamCursor() 
Docs

📕




$1412

WhooshRect

Animates a “zooming” effect from one rectangle to another

Parameters
Stack before call
previous contents
flags Long — Flags
 
smallRect Long — POINTER to first rectangle
 
bigRect Long — POINTER to second rectangle
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void WhooshRect(flags,smallRect,bigRect) 
Docs

📕




$1512

DrawStringWidth

Draws a string in a specified horizontal width on a single line

Parameters
Stack before call
previous contents
flagsWord — Flags
ref Long — String reference
 
widthWord — Width in pixels
SP
Stack after call
previous contents
SP
Errors
$1231    badQDAuxValue           Illegal input values
System Loader errors             Returned unchanged
C
extern pascal void DrawStringWidth(flags,ref,width) 
Docs

📕




$1612

UseColorTable

Preserves Scanline Control Bytes (SCBs) and sets them to use a color table you specify

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
tableNumWord — Color table number (0..15)
tablePtr Long — Pointer to color table (NIL = standard)
 
widthWord — Flags
SP
Stack after call
previous contents
colorInfo Long — Value to pass to RestoreColorTable
 
SP
Errors
NewHandle errors                 Returned unchanged
C
extern pascal Long UseColorTable(tableNum,tablePtr,flags) 
Docs

📕




$1712

RestoreColorTable

Undoes the effects of UseColorTable

Parameters
Stack before call
previous contents
colorInfo Long — Color information from UseColorTable
 
flagsWord — Flags
SP
Stack after call
previous contents
SP
Errors
DisposeHandle errors             Returned unchanged
C
extern pascal void RestoreColorTable(colorInfo,flags) 
Docs

📕




$B712

OpenPicture

Allocates memory for the recording of drawing commands into a picture definition, and returns picture handle. (see QuickDraw II OpenPicture call $B704)

Docs

2️⃣




$B812

PicComment

Inserts a specified comment into the currently open picture. (see QuickDraw II PicComment call $B804)

Docs

2️⃣




$BA12

DrawPicture

Takes drawing commands recorded in picture definition, maps them from picture frame into destination rect. (see QuickDraw II DrawPicture call $BA04)

Docs

2️⃣




$BB12

KillPicture

Releases all memory occupied by a specifed picture. (see QuickDraw II KillPicture call $BB04)

Docs

2️⃣











Print Manager Calls
Routine#Description
PMBootInit$0113Initializes the Print Manager; called only by Tool Locator - not by application
PMStartUp$0213Starts up the Print Manager for use by an application
PMShutDown$0313Shuts down the Print Manager when an application quits
PMVersion$0413Returns the version number of the Print Manager
PMReset$0513Resets the Print Manager; called only when system reset - not by application
PMStatus$0613Indicates whether the Print Manager is active
PrDefault$0913Fills the fields of specified print record with default values for the appropriate printer. printRecordHandle may be a new or an existing print record.
PrValidate$0A13Checks print record for compatibility w/current version # of Print Mgr & installed printer
PrStlDialog$0B13Conducts a style dialog w/user to determine page dimens & other info needed for page setup
PrJobDialog$0C13Conducts a job dialog w/user to determine print quality, range of pages to print, etc.
PrPixelMap$0D13Prints all or part of a specified pixel map
PrOpenDoc$0E13Initializes a GrafPort for use in printing a document, makes it the current port, and returns a pointer to the port.
PrCloseDoc$0F13Closes the GrafPort being used for printing
PrOpenPage$1013Begins a new page. Only printed if it falls within page range given in job subrecord. Must balance each PrOpenPage with a call to PrClosePage.
PrClosePage$1113Ends the printing of the current page
PrPicFile$1213Prints a spooled document. If spool printing is being used, your application should normally call PrPicFile after it calls the PrCloseDoc routine.
PrError$1413Returns last printer error code left during printing loop by Print Manager routines (see Toolbox Ref Vol1, Figure 15-7).
PrSetError$1513Stores a specified value into the global variable where the Print Manager keeps its printer error code. E.g. - can be used to abort a print by setting to prAbort.
PrChoosePrinter$1613Conducts a Choose Printer dialog w/user to determine printer and port driver to use.
PrGetPrinterSpecs$1813Returns information about the currently selected printer.
PrDriverVer$2313Returns the version number of the currently installed printer driver
PrPortVer$2413Returns the version number of the currently installed port driver
PrGetZoneName$2513Returns the name string for the currently selected AppleTalk print zone
PrGetPrinterDvrName$2813Returns the name string for the currently selected printer driver
PrGetPortDvrName$2913Returns the name string for the currently selected port driver.
PrGetUserName$2A13Returns the user name as entered in the Control Panel.
PrGetNetworkName$2B13Returns the AppleTalk network name for the currently selected printer; otherwise NIL if non-networked printer.
PMUnloadDriver$3413Unloads current port driver, printer driver, or both, depending on input parameter
PMLoadDriver$3513Loads current printer driver, port driver, or both, depending on the input parameter
PrGetDocName$3613Returns a pointer to the current document name string for your document
PrSetDocName$3713Sets the document name for use with AppleTalk printers
PrGetPgOrientation$3813Returns a value indicating the current page orientation for the specified document

Print Manager Calls


$0113

PMBootInit

Initializes the Print Manager; called only by Tool Locator - not by application






$0213

PMStartUp

Starts up the Print Manager for use by an application

Parameters
Stack before call
previous contents
userIDWord — ID number of the application
dPageAddrWord — Bank $0 starting address for 2 pages of direct-page space
SP
Stack after call
previous contents
SP
Errors
$1301    missingDriver           Specified driver not in DRIVERS subdirectory of SYSTEM subdirectory
System Loader errors             Returned unchanged
Tool Locator errors              Returned unchanged
Memory Manager errors            Returned unchanged
C
extern pascal void PMStartUp(userID,dPageAddr) 
Docs

1️⃣




$0313

PMShutDown

Shuts down the Print Manager when an application quits

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C
extern pascal void PMShutDown() 
Docs

1️⃣




$0413

PMVersion

Returns the version number of the Print Manager

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
versionInfoWord — Version number of the Print Manager
SP
Errors

None

C
extern pascal Word PMVersion() 
Docs

1️⃣




$0513

PMReset

Resets the Print Manager; called only when system reset - not by application

Parameters

The stack is not affected by this call. There are no input or output parameters.

Errors

None

C

Call must not be made by an application.

Docs

1️⃣




$0613

PMStatus

Indicates whether the Print Manager is active

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
activeFlagWord — BOOLEAN; TRUE if Print Manager is active, FALSE if not
SP
Errors

None

C
extern pascal Boolean PMStatus() 
Docs

1️⃣




$0913

PrDefault

Fills the fields of specified print record with default values for the appropriate printer. printRecordHandle may be a new or an existing print record.

Parameters
Stack before call
previous contents
printRecordHandle Long — HANDLE to print record
 
SP
Stack after call
previous contents
SP
Errors
$1303    noPrintRecord           No print record was specified
Memory Manager errors            Returned unchanged
C
extern pascal void PrDefault(printRecordHandle) 
Docs

1️⃣




$0A13

PrValidate

Checks print record for compatibility w/current version # of Print Mgr & installed printer

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
printRecordHandle Long — HANDLE to print record
 
SP
Stack after call
previous contents
recAdjustFlagWord — BOOLEAN; TRUE if record adjusted, FALSE if no change
SP
Errors
Memory Manager errors            Returned unchanged
C
extern pascal Boolean PrValidate(printRecordHandle) 
Docs

1️⃣




$0B13

PrStlDialog

Conducts a style dialog w/user to determine page dimens & other info needed for page setup

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
printRecordHandle Long — HANDLE to print record
 
SP
Stack after call
previous contents
confirmFlagWord — BOOLEAN; TRUE if user confirms dialog, FALSE if not
SP
Errors
Memory Manager errors            Returned unchanged
C
extern pascal Boolean PrStlDialog(printRecordHandle) 
Docs

1️⃣




$0C13

PrJobDialog

Conducts a job dialog w/user to determine print quality, range of pages to print, etc.

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
printRecordHandle Long — HANDLE to print record
 
SP
Stack after call
previous contents
confirmFlagWord — BOOLEAN; TRUE if user confirms dialog, FALSE if not
SP
Errors
Memory Manager errors            Returned unchanged
C
extern pascal Boolean PrJobDialog(printRecordHandle) 
Docs

1️⃣




$0D13

PrPixelMap

Prints all or part of a specified pixel map

Parameters
Stack before call
previous contents
srcLogPtr Long — POINTER to source LocInfo containing POINTER to pixel map
 
srcRectPtr Long — POINTER to rectangle enclosing portion of pixel map to print
 
colorFlagWord — BOOLEAN; TRUE if printing in color, FALSE if in black and white
SP
Stack after call
previous contents
SP
Errors
$1302    portNotOn               The specified port is not selected in the Control Panel
$1304    badLaserPrep            The version of LaserPrep in the drivers folder is not compatible with this version of the Print Manager
$1305    badLPFile               The version of LaserPrep in the drivers folder is not compatible with this version of the Print Manager
$1306    papConnNotOpen          Connection can’t be established with the LaserWriter
$1307    papReadWriteErr         Read-write error on the LaserWriter
Memory Manager errors            Returned unchanged
QuickDraw II errors              Returned unchanged
C
extern pascal void PrPixelMap(srcLocPtr,srcRectPtr,colorFlag) 
Docs

1️⃣




$0E13

PrOpenDoc

Initializes a GrafPort for use in printing a document, makes it the current port, and returns a pointer to the port.

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
printRecordHandle Long — HANDLE to print record
 
printGrafPortPtr Long — POINTER to GrafPort, if desired; NIL to allocate new GrafPort
 
SP
Stack after call
previous contents
printGrafPortPtr Long — POINTER to GrafPort
 
SP
Errors
$1302    portNotOn               The specified port is not selected in the Control Panel
$1304    badLaserPrep            The version of LaserPrep in the drivers folder is not compatible with this version of the Print Manager
$1305    badLPFile               The version of LaserPrep in the drivers folder is not compatible with this version of the Print Manager
$1306    papConnNotOpen          Connection can’t be established with the LaserWriter
$1307    papReadWriteErr         Read-write error on the LaserWriter
Memory Manager errors            Returned unchanged
ProDOS 16 errors                 Returned unchanged
C
extern pascal GrafPortPtr PrOpenDoc(printRecordHandle,printGrafPortPtr) 
Docs

1️⃣




$0F13

PrCloseDoc

Closes the GrafPort being used for printing

Parameters
Stack before call
previous contents
printGrafPortPtr Long — POINTER to GrafPort to be used for printing
 
SP
Stack after call
previous contents
SP
Errors
$1302    portNotOn               The specified port is not selected in the Control Panel
C
extern pascal void PrCloseDoc(printGrafPortPtr) 
Docs

1️⃣




$1013

PrOpenPage

Begins a new page. Only printed if it falls within page range given in job subrecord. Must balance each PrOpenPage with a call to PrClosePage.

Parameters
Stack before call
previous contents
printGrafPortPtr Long — POINTER to GrafPort to be used for printing
 
pageFramePtr Long — POINTER to scaling rectangle; NIL for none
 
SP
Stack after call
previous contents
SP
Errors
$1302    portNotOn               The specified port is not selected in the Control Panel
Memory Manager errors            Returned unchanged
C
extern pascal void PrOpenPage(printGrafPortPtr,pageFramePtr) 
Docs

1️⃣




$1113

PrClosePage

Ends the printing of the current page

Parameters
Stack before call
previous contents
printGrafPortPtr Long — POINTER to GrafPort to be used for printing
 
SP
Stack after call
previous contents
SP
Errors
$1302    portNotOn               The specified port is not selected in the Control Panel
C
extern pascal void PrClosePage(printGrafPortPtr) 
Docs

1️⃣




$1213

PrPicFile

Prints a spooled document. If spool printing is being used, your application should normally call PrPicFile after it calls the PrCloseDoc routine.

Parameters
Stack before call
previous contents
printRecordHandle Long — HANDLE to print record
 
printGrafPortPtr Long — POINTER to GrafPort, if desired; NIL to allocate new GrafPort
 
statusRecPtr Long — POINTER to printer status record (see Toolbox Ref Vol1, Figure 15-13)
 
SP
Stack after call
previous contents
SP
Errors
$1302    portNotOn               The specified port is not selected in the Control Panel
Memory Manager errors            Returned unchanged
C
extern pascal void PrPicfile(printRecordHandle,printGrafPortPtr,statusRecPtr) 
Docs

1️⃣




$1413

PrError

Returns last printer error code left during printing loop by Print Manager routines (see Toolbox Ref Vol1, Figure 15-7).

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
lastErrorWord — Last printer error code left by Print Manager routine
SP
Errors

None

C
extern pascal word PrError() 
Docs

1️⃣




$1513

PrSetError

Stores a specified value into the global variable where the Print Manager keeps its printer error code. E.g. - can be used to abort a print by setting to prAbort.

Parameters
Stack before call
previous contents
errorNumberWord — Error number to be stored
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void PrSetError(errorNumber) 
Docs

1️⃣




$1613

PrChoosePrinter

Conducts a Choose Printer dialog w/user to determine printer and port driver to use.

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
driverChangedFlagWord — BOOLEAN; TRUE if driver changed, FALSE if no change
SP
Errors

None

C
extern pascal Boolean PrChoosePrinter() 
Docs

1️⃣




$1813

PrGetPrinterSpecs

Returns information about the currently selected printer.

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
wordspaceWord — Space for result
SP
Stack after call
previous contents
characteristicsWord — Word defining printer characteristics
printerTypeWord — Word indicating the type of printer connected
SP
Errors

None

C
extern pascal PrinterSpecs PrGetPrinterSpecs() 
Docs

3️⃣




$2313

PrDriverVer

Returns the version number of the currently installed printer driver

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
versionInfoWord — Version number of the printer driver
SP
Errors

None

C
extern pascal Word PrDriverVer() 
Docs

1️⃣




$2413

PrPortVer

Returns the version number of the currently installed port driver

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
SP
Stack after call
previous contents
versionInfoWord — Version number of the port driver
SP
Errors

None

C
extern pascal Word PrPortVer() 
Docs

1️⃣




$2513

PrGetZoneName

Returns the name string for the currently selected AppleTalk print zone

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
zoneNamePtr Long — POINTER to zone namestring (Pascal string)
 
SP
Errors

None

C
extern pascal Pointer PrGetZoneName() 
Docs

3️⃣




$2813

PrGetPrinterDvrName

Returns the name string for the currently selected printer driver

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
ptrDvrNamePtr Long — POINTER to printer driver name string (Pascal string)
 
SP
Errors

None

C
extern pascal Pointer PrGetPrinterDvrName() 
Docs

3️⃣




$2913

PrGetPortDvrName

Returns the name string for the currently selected port driver.

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
ptrDvrNamePtr Long — POINTER to port driver name string (Pascal string)
 
SP
Errors

None

C
extern pascal Pointer PrGetPortDvrName() 
Docs

3️⃣




$2A13

PrGetUserName

Returns the user name as entered in the Control Panel.

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
userNamePtr Long — POINTER to user name string (Pascal string)
 
SP
Errors

None

C
extern pascal Pointer PrGetUserName() 
Docs

3️⃣




$2B13

PrGetNetworkName

Returns the AppleTalk network name for the currently selected printer; otherwise NIL if non-networked printer.

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
netNamePtr Long — POINTER to network name string (Pascal string)
 
SP
Errors

None

C
extern pascal Pointer PrGetNetworkName() 
Docs

3️⃣




$3413

PMUnloadDriver

Unloads current port driver, printer driver, or both, depending on input parameter

Parameters
Stack before call
previous contents
whichDriverWord — Printer driver to unload
SP
Stack after call
previous contents
SP
Errors
$1309    badLoadParam            The specified parameter is invalid
System Loader errors             Returned unchanged
C
extern pascal void PMUnloadDriver(whichDriver) 
Docs

3️⃣




$3513

PMLoadDriver

Loads current printer driver, port driver, or both, depending on the input parameter

Parameters
Stack before call
previous contents
whichDriverWord — Printer driver to load
SP
Stack after call
previous contents
SP
Errors
$1309    badLoadParam            The specified parameter is invalid
System Loader errors             Returned unchanged
C
extern pascal void PMLoadDriver(whichDriver) 
Docs

3️⃣




$3613

PrGetDocName

Returns a pointer to the current document name string for your document

Parameters
Stack before call
previous contents
longspace Long — Space for result
 
SP
Stack after call
previous contents
docNamePtr Long — POINTER to document name string (Pascal string)
 
SP
Errors

None

C
extern pascal Pointer PrGetDocName() 
Docs

3️⃣




$3713

PrSetDocName

Sets the document name for use with AppleTalk printers

Parameters
Stack before call
previous contents
docNamePtr Long — POINTER to document name string (Pascal string)
 
SP
Stack after call
previous contents
SP
Errors

None

C
extern pascal void PrSetDocName() 
Docs

3️⃣




$3813

PrGetPgOrientation

Returns a value indicating the current page orientation for the specified document

Parameters
Stack before call
previous contents
wordspaceWord — Space for result
prRecordHandle Long — HANDLE to print record for document
 
SP
Stack after call
previous contents
orientationWord — Pageorientation: 0 = portrait, 1 = landscape
SP
Errors

None

C
extern pascal Word PrGetPgOrientation(prRecordHandle) 
Docs

3️⃣








Line Edit




Line Edit Calls
Routine#Description
LEBootInit$0114Initializes the LineEdit Tool Set; called only by Tool Locator
LEStartUp$0214Starts up the LineEdit Tool Set for use by an application
LEShutDown$0314Shuts down the LineEdit Tool Set when an application quits
LEVersion$0414Returns the version number of the LineEdit Tool Set
LEReset$0514Resets the LineEdit Tool Set; called only when the system is reset
LEStatus$0614Indicates whether the LineEdit Tool Set is active
LENew$0914Allocates space for text, creates & inits edit record, & returns handle to new edit record
LEDispose$0A14Releases the memory allocated for a specified edit record
LESetText$0B14Incorporates a copy of the specified text into a specified edit record
LEIdle$0C14Causes the caret at the insertion point (if any) in specified text to blink
LEClick$0D14Controls placement & highlighting of selection range as determined by mouse events
LESetSelect$0E14Sets the selection range of a specified edit record
LEActivate$0F14Highlights the selection range or caret of a specified edit record
LEDeactivate$1014Unhighlights the selection range or caret of a specified edit record
LEKey$1114Replaces select range/caret in text of specified edit record w/specified char & leaves insert pnt
LECut$1214Removes selection range from text of specified edit record & places it in LineEdit scrap
LECopy$1314Copies selection range from text of a specified edit record to the LineEdit scrap
LEPaste$1414Replaces selec range/caret in text of specified edit record w/contents of LineEdit scrap
LEDelete$1514Removes selec range from text of specified edit record without placing it in LineEdit scrap
LEInsert$1614Takes specified text & inserts it just before selection range/caret in text of specified edit record
LEUpdate$1714Redraws the text of a specified edit record
LETextBox$1814Draws specified text in a specified rectangle, justifying the text as specified
LEFromScrap$1914Copies the desk scrap to the LineEdit scrap
LEToScrap$1A14Copies the LineEdit scrap to the desk scrap
LEScrapHandle$1B14Returns a handle to the LineEdit scrap
LEGetScrapLen$1C14Returns the size of the LineEdit scrap in bytes
LESetScrapLen$1D14Sets the size of the LineEdit scrap to a specified number of bytes
LESetHilite$1E14Sets the leHiliteHook field of a psecified edit record to a specified address
LESetCaret$1F14Sets the leCaretHook field of a specified edit record to a specified address
LETextBox2$2014Draws specified txt in specified rectangle, justify text as spec, w/word wrap, & handle embed chges
LESetJust$2114Sets the style of justification for the text of a specified edit record
LEGetTextHand$2214Returns a handle to the text of a specified edit record
LEGetTextLen$2314Returns the length of the text of a specified edit record in bytes
GetLEDefProc$2414Returns the address of the current LineEdit control definition procedure
LEClassifyKey$2514Returns a word with bits indicating what categories a specified event falls into

Line Edit Calls


$0114

LEBootInit

Initializes the LineEdit Tool Set; called only by Tool Locator






$0214

LEStartUp

Starts up the LineEdit Tool Set for use by an application






$0314

LEShutDown

Shuts down the LineEdit Tool Set when an application quits






$0414

LEVersion

Returns the version number of the LineEdit Tool Set






$0514

LEReset

Resets the LineEdit Tool Set; called only when the system is reset






$0614

LEStatus

Indicates whether the LineEdit Tool Set is active






$0914

LENew

Allocates space for text, creates & inits edit record, & returns handle to new edit record






$0A14

LEDispose

Releases the memory allocated for a specified edit record






$0B14

LESetText

Incorporates a copy of the specified text into a specified edit record






$0C14

LEIdle

Causes the caret at the insertion point (if any) in specified text to blink






$0D14

LEClick

Controls placement & highlighting of selection range as determined by mouse events






$0E14

LESetSelect

Sets the selection range of a specified edit record






$0F14

LEActivate

Highlights the selection range or caret of a specified edit record






$1014

LEDeactivate

Unhighlights the selection range or caret of a specified edit record






$1114

LEKey

Replaces select range/caret in text of specified edit record w/specified char & leaves insert pnt






$1214

LECut

Removes selection range from text of specified edit record & places it in LineEdit scrap






$1314

LECopy

Copies selection range from text of a specified edit record to the LineEdit scrap






$1414

LEPaste

Replaces selec range/caret in text of specified edit record w/contents of LineEdit scrap






$1514

LEDelete

Removes selec range from text of specified edit record without placing it in LineEdit scrap






$1614

LEInsert

Takes specified text & inserts it just before selection range/caret in text of specified edit record






$1714

LEUpdate

Redraws the text of a specified edit record






$1814

LETextBox

Draws specified text in a specified rectangle, justifying the text as specified






$1914

LEFromScrap

Copies the desk scrap to the LineEdit scrap






$1A14

LEToScrap

Copies the LineEdit scrap to the desk scrap






$1B14

LEScrapHandle

Returns a handle to the LineEdit scrap






$1C14

LEGetScrapLen

Returns the size of the LineEdit scrap in bytes






$1D14

LESetScrapLen

Sets the size of the LineEdit scrap to a specified number of bytes






$1E14

LESetHilite

Sets the leHiliteHook field of a psecified edit record to a specified address






$1F14

LESetCaret

Sets the leCaretHook field of a specified edit record to a specified address






$2014

LETextBox2

Draws specified txt in specified rectangle, justify text as spec, w/word wrap, & handle embed chges






$2114

LESetJust

Sets the style of justification for the text of a specified edit record






$2214

LEGetTextHand

Returns a handle to the text of a specified edit record






$2314

LEGetTextLen

Returns the length of the text of a specified edit record in bytes






$2414

GetLEDefProc

Returns the address of the current LineEdit control definition procedure






$2514

LEClassifyKey

Returns a word with bits indicating what categories a specified event falls into










Dialog Manager




Dialog Manager Calls
Routine#Description
DialogBootInit$0115Initializes the Dialog Manager; called only by Tool Locator (not application)
DialogStartUp$0215Starts up the Dialog Manager for use by an application
DialogShutDown$0315Shuts down the Dialog Manager
DialogVersion$0415Returns the version number of the Dialog Manager
DialogReset$0515Resets the Dialog Manager; called only on reset (not by application)
DialogStatus$0615Indicates whether the Dialog Manager is active
ErrorSound$0915Establishes the sound procedure for alerts
NewModalDialog$0A15Creates a specified modal dialog & returns a pointer to the GrafPort of the new dialog
NewModelessDia$0B15Creates a specified modeless dialog & returns a pointer to the GrafPort of the new dialog
CloseDialog$0C15Removes a specified dialog window from the screen and deletes it from the window list
NewDItem$0D15Adds a new item to the dialog's item list
RemoveDItem$0E15Removes a specified item from a specified dialog and erases it from the screen
ModalDialog$0F15If frontmost window is modal dialog box, then repeatedly gets events in dialog's window
IsDialogEvent$1015Determines whether a specified event needs to be handled as part of modeless dialog
DialogSelect$1115Handles an event as part of a specified modeless dialog
DlgCut$1215Checks if specified dialog has any editLine items, if so applies LEcut proc to selected item
DlgCopy$1315Checks if specified dialog has any editLine items, if so applies LEcopy proc to selected item
DlgPaste$1415Checks if specified dialog has any editLine items, if so applies LEPaste proc to selected item
DlgDelete$1515Checks if specified dialog has any editLine items, if so applies LEDelete proc to selected item
DrawDialog$1615Draws the contents of a specified dialog box
Alert$1715Invokes an alert defined by a specified alert template
StopAlert$1815Invokes an alert defined by alert template & draws stop icon in upper-left corner of box
NoteAlert$1915Invokes an alert defined by alert template & draws note icon in upper-left corner of box
CautionAlert$1A15Invokes an alert defined by alert template & draws caution icon in uppr-left corner of box
ParamText$1B15Specifies text for 1-4 special strings in statText, longStatText, & longStatText2 items
SetDAFont$1C15Specifies the font for the dialog or alert window's GrafPort
GetControlDIte$1E15Returns a handle to the control for a specified item
GetIText$1F15Returns the text of a specified statText or editLine item in a psecified dialog box
SetIText$2015Provides text for specified statText or editLine item in a specified dialog box & draws the item
SelectIText$2115Sets selection range or insertion point for a specified editLine item in a specified dialog box
HideDItem$2215Erases a specified item from a specified dialog
ShowDItem$2315Makes visible a specified item from a specified dialog
FindDItem$2415Returns the ID of the item located at a specified point in a specified dialog
UpdateDialog$2515Redraws the part of a specified dialog that is in a specifed update region
GetDItemType$2615Returns type of a specified item (buttonItem, radioItem, statText, etc.)
SetDItemType$2715Changes a specified item to a new specified item type
GetDItemBox$2815Returns the display rectangle of a specified item
SetDItemBox$2915Changes the display rectangle of a specified item to a new display rectangle
GetFirstDItem$2A15Returns the ID of the first item in a specified dialog
GetNextDItem$2B15Returns the ID of the next item in a specified dialog after a specified item
ModalDialog2$2C15If frontmost wndow is modal, then handles events in window; returns code if emabled item
GetDItemValue$2E15Returns the current value of a specified item
SetDItemValue$2F15Sets the value of a specified item to a new desired value & redraws the item
GetNewModalDia$3215Creates a modal dialog & returns a pointer to the port of the new dialog
GetNewDItem$3315Adds a new item to a specified dialog's item list using a template
GetAlertStage$3415Returns the stage of the last occurence of an alert as a number from 0 to 3
ResetAlertStag$3515Resets stage of last occurrence of alert so next occurence of same alert will be as first
DefaultFilter$3615Calls standard default filter used by ModalDialog or Alert when no user filter is spec
GetDefButton$3715Returns the ID of the default button item in a specified dialog
SetDefButton$3815Sets the ID of the default button to a specified ID
DisableDItem$3915Disables a specified item in a specified dialog
EnableDItem$3A15Enables a specified item in a specified dialog

Dialog Manager Calls


$0115

DialogBootInit

Initializes the Dialog Manager; called only by Tool Locator (not application)






$0215

DialogStartUp

Starts up the Dialog Manager for use by an application






$0315

DialogShutDown

Shuts down the Dialog Manager






$0415

DialogVersion

Returns the version number of the Dialog Manager






$0515

DialogReset

Resets the Dialog Manager; called only on reset (not by application)






$0615

DialogStatus

Indicates whether the Dialog Manager is active






$0915

ErrorSound

Establishes the sound procedure for alerts






$0A15

NewModalDialog

Creates a specified modal dialog & returns a pointer to the GrafPort of the new dialog






$0B15

NewModelessDia

Creates a specified modeless dialog & returns a pointer to the GrafPort of the new dialog






$0C15

CloseDialog

Removes a specified dialog window from the screen and deletes it from the window list






$0D15

NewDItem

Adds a new item to the dialog's item list






$0E15

RemoveDItem

Removes a specified item from a specified dialog and erases it from the screen






$0F15

ModalDialog

If frontmost window is modal dialog box, then repeatedly gets events in dialog's window






$1015

IsDialogEvent

Determines whether a specified event needs to be handled as part of modeless dialog






$1115

DialogSelect

Handles an event as part of a specified modeless dialog






$1215

DlgCut

Checks if specified dialog has any editLine items, if so applies LEcut proc to selected item






$1315

DlgCopy

Checks if specified dialog has any editLine items, if so applies LEcopy proc to selected item






$1415

DlgPaste

Checks if specified dialog has any editLine items, if so applies LEPaste proc to selected item






$1515

DlgDelete

Checks if specified dialog has any editLine items, if so applies LEDelete proc to selected item






$1615

DrawDialog

Draws the contents of a specified dialog box






$1715

Alert

Invokes an alert defined by a specified alert template






$1815

StopAlert

Invokes an alert defined by alert template & draws stop icon in upper-left corner of box






$1915

NoteAlert

Invokes an alert defined by alert template & draws note icon in upper-left corner of box






$1A15

CautionAlert

Invokes an alert defined by alert template & draws caution icon in uppr-left corner of box






$1B15

ParamText

Specifies text for 1-4 special strings in statText, longStatText, & longStatText2 items






$1C15

SetDAFont

Specifies the font for the dialog or alert window's GrafPort






$1E15

GetControlDIte

Returns a handle to the control for a specified item






$1F15

GetIText

Returns the text of a specified statText or editLine item in a psecified dialog box






$2015

SetIText

Provides text for specified statText or editLine item in a specified dialog box & draws the item






$2115

SelectIText

Sets selection range or insertion point for a specified editLine item in a specified dialog box






$2215

HideDItem

Erases a specified item from a specified dialog






$2315

ShowDItem

Makes visible a specified item from a specified dialog






$2415

FindDItem

Returns the ID of the item located at a specified point in a specified dialog






$2515

UpdateDialog

Redraws the part of a specified dialog that is in a specifed update region






$2615

GetDItemType

Returns type of a specified item (buttonItem, radioItem, statText, etc.)






$2715

SetDItemType

Changes a specified item to a new specified item type






$2815

GetDItemBox

Returns the display rectangle of a specified item






$2915

SetDItemBox

Changes the display rectangle of a specified item to a new display rectangle






$2A15

GetFirstDItem

Returns the ID of the first item in a specified dialog






$2B15

GetNextDItem

Returns the ID of the next item in a specified dialog after a specified item






$2C15

ModalDialog2

If frontmost wndow is modal, then handles events in window; returns code if emabled item






$2E15

GetDItemValue

Returns the current value of a specified item






$2F15

SetDItemValue

Sets the value of a specified item to a new desired value & redraws the item






$3215

GetNewModalDia

Creates a modal dialog & returns a pointer to the port of the new dialog






$3315

GetNewDItem

Adds a new item to a specified dialog's item list using a template






$3415

GetAlertStage

Returns the stage of the last occurence of an alert as a number from 0 to 3






$3515

ResetAlertStag

Resets stage of last occurrence of alert so next occurence of same alert will be as first






$3615

DefaultFilter

Calls standard default filter used by ModalDialog or Alert when no user filter is spec






$3715

GetDefButton

Returns the ID of the default button item in a specified dialog






$3815

SetDefButton

Sets the ID of the default button to a specified ID






$3915

DisableDItem

Disables a specified item in a specified dialog






$3A15

EnableDItem

Enables a specified item in a specified dialog










Scrap Manager




Scrap Manager Calls
Routine#Description
ScrapBootInit$0116Initializes the Scrap Manager; called only by Tool Locator (not application)
ScrapStartUp$0216Starts up the Scrap Manager for use by an application
ScrapShutDown$0316Shuts down the Scrap Manager
ScrapVersion$0416Returns the version number of the Scrap Manager
ScrapReset$0516Resets the Scrap Manager; called only on reset (not by application)
ScrapStatus$0616Indicates whether the Scrap Manager is active
UnloadScrap$0916Writes desk scrap from memory to the scrap file & releases the memory it occupied
LoadScrap$0A16Reads the desk scrap from the scrap file into memory
ZeroScrap$0B16Clears the contents of the scrap and increments the scrap count
PutScrap$0C16Appends specified data to the scrap that has the same scrap type as the data
GetScrap$0D16Copies scrap info of appropriate type to specified handle, setting handle to correct size
GetScrapHandle$0E16Returns a copy of the handle for the scrap of a specified type
GetScrapSize$0F16Returns the size of the specified scrap
GetScrapPath$1016Returns a pointer to the pathname used for the Clipboard file
SetScrapPath$1116Sets a pointer to the pathname used for the Clipboard file
GetScrapCount$1216Returns the current scrap count
GetScrapState$1316Returns a flag indicating the current state of the scrap
GetIndScrap$1416This call is useful for utilities that want to read all scrap types
ShowClipboard$1516Creates a System window that takes care of the clipboard display for you

Scrap Manager Calls


$0116

ScrapBootInit

Initializes the Scrap Manager; called only by Tool Locator (not application)






$0216

ScrapStartUp

Starts up the Scrap Manager for use by an application






$0316

ScrapShutDown

Shuts down the Scrap Manager






$0416

ScrapVersion

Returns the version number of the Scrap Manager






$0516

ScrapReset

Resets the Scrap Manager; called only on reset (not by application)






$0616

ScrapStatus

Indicates whether the Scrap Manager is active






$0916

UnloadScrap

Writes desk scrap from memory to the scrap file & releases the memory it occupied






$0A16

LoadScrap

Reads the desk scrap from the scrap file into memory






$0B16

ZeroScrap

Clears the contents of the scrap and increments the scrap count






$0C16

PutScrap

Appends specified data to the scrap that has the same scrap type as the data






$0D16

GetScrap

Copies scrap info of appropriate type to specified handle, setting handle to correct size






$0E16

GetScrapHandle

Returns a copy of the handle for the scrap of a specified type






$0F16

GetScrapSize

Returns the size of the specified scrap






$1016

GetScrapPath

Returns a pointer to the pathname used for the Clipboard file






$1116

SetScrapPath

Sets a pointer to the pathname used for the Clipboard file






$1216

GetScrapCount

Returns the current scrap count






$1316

GetScrapState

Returns a flag indicating the current state of the scrap






$1416

GetIndScrap

This call is useful for utilities that want to read all scrap types






$1516

ShowClipboard

Creates a System window that takes care of the clipboard display for you










Std File Ops




Std File Ops Calls
Routine#Description
SFBootInit$0117Initializes the Std File Ops Tool Set; called only by Tool Locator (not by application)
SFStartUp$0217Starts up the Std File Ops Tool Set for use by an application
SFShutDown$0317Shuts down the Standard File Operations Tool Set when application quits
SFVersion$0417Returns the version number of the Standard File Operations Tool Set
SFReset$0517Resets the Std File Ops Tool Set; called only on system reset - not by application
SFStatus$0617Indicates whether the Std File Ops Tool Set is active
SFGetFile$0917Displays the standard Open FIle dialog box & returns info about the file selected by user
SFPutFile$0A17Displays standard Save File dialog box & returns info about the name of file to be saved
SFPGetFile$0B17Displays custom Open File dialog box & returns info about file selected by user
SFPPutFile$0C17Displays custom Save File dialog box & returns info about the name of file to be saved
SFAllCaps$0D17Allows applicat. to decide if filenames will be displayed in all upper or upper/lowercase
SFGetFile2$0E17Displays the standard Open File dialog box and returns information about the file selected by the user
SFPutFile2$0F17Displays the standard Save File dialog box and returns the file specification entered by the user
SFPGetFile2$1017Displays a custom Open File dialog box and returns information about the file selected by the user
SFPPutFile2$1117Displays a custom Save File dialog box and returns information about the file specification entered by the user
SFShowinvisibl$1217Controls the display of invisible files
SFReScan$1317Forces the system to rebuild and redisplay the current list of files
SFMultiGet2$1417Displays the standard Open Multifile dialog box and returns information about the file or files selected by the user
SFPMultiGet2$1517Displays a custom Open Multifile dialog box and returns information about the file or files selected by the user

Std File Ops Calls


$0117

SFBootInit

Initializes the Std File Ops Tool Set; called only by Tool Locator (not by application)






$0217

SFStartUp

Starts up the Std File Ops Tool Set for use by an application






$0317

SFShutDown

Shuts down the Standard File Operations Tool Set when application quits






$0417

SFVersion

Returns the version number of the Standard File Operations Tool Set






$0517

SFReset

Resets the Std File Ops Tool Set; called only on system reset - not by application






$0617

SFStatus

Indicates whether the Std File Ops Tool Set is active






$0917

SFGetFile

Displays the standard Open FIle dialog box & returns info about the file selected by user






$0A17

SFPutFile

Displays standard Save File dialog box & returns info about the name of file to be saved






$0B17

SFPGetFile

Displays custom Open File dialog box & returns info about file selected by user






$0C17

SFPPutFile

Displays custom Save File dialog box & returns info about the name of file to be saved






$0D17

SFAllCaps

Allows applicat. to decide if filenames will be displayed in all upper or upper/lowercase






$0E17

SFGetFile2

Displays the standard Open File dialog box and returns information about the file selected by the user






$0F17

SFPutFile2

Displays the standard Save File dialog box and returns the file specification entered by the user






$1017

SFPGetFile2

Displays a custom Open File dialog box and returns information about the file selected by the user






$1117

SFPPutFile2

Displays a custom Save File dialog box and returns information about the file specification entered by the user






$1217

SFShowinvisibl

Controls the display of invisible files






$1317

SFReScan

Forces the system to rebuild and redisplay the current list of files






$1417

SFMultiGet2

Displays the standard Open Multifile dialog box and returns information about the file or files selected by the user






$1517

SFPMultiGet2

Displays a custom Open Multifile dialog box and returns information about the file or files selected by the user










Note Synthesize




Note Synthesize Calls
Routine#Description
NSBootInit$0119Initializes the Note Synthesizer; called only by Tool Locator (not application)
NSStartUp$0219Starts up the Note Synthesizer for use by an application
NSShutDown$0319Shuts down the Note Synthesizer
NSVersion$0419Returns the version number of the Note Synthesizer
NSReset$0519Resets the Note Synthesizer; called only on reset (not by application)
NSStatus$0619Indicates whether the Note Synthesizer is active
AllocGen$0919Requests allocation of a sound generator - returns a generator number from 0 to 13
DeallocGen$0A19Sets the named generator's allocation priority to zero
NoteOn$0B19Initiates generation of a note on a specified generator
NoteOff$0C19Switches the specified generator to release mode, which causes note being generated to die out
AllNotesOff$0D19Turns off all Note Synthesizer generators & sets their priorities to zero
NSSetUpdateRate$0E19Sets the Note Synthesizer's updateRate parameter
NSSetUserUpdate$0F19Sets the user update routine

Note Synthesize Calls


$0119

NSBootInit

Initializes the Note Synthesizer; called only by Tool Locator (not application)






$0219

NSStartUp

Starts up the Note Synthesizer for use by an application






$0319

NSShutDown

Shuts down the Note Synthesizer






$0419

NSVersion

Returns the version number of the Note Synthesizer






$0519

NSReset

Resets the Note Synthesizer; called only on reset (not by application)






$0619

NSStatus

Indicates whether the Note Synthesizer is active






$0919

AllocGen

Requests allocation of a sound generator - returns a generator number from 0 to 13






$0A19

DeallocGen

Sets the named generator's allocation priority to zero






$0B19

NoteOn

Initiates generation of a note on a specified generator






$0C19

NoteOff

Switches the specified generator to release mode, which causes note being generated to die out






$0D19

AllNotesOff

Turns off all Note Synthesizer generators & sets their priorities to zero






$0E19

NSSetUpdateRate

Sets the Note Synthesizer's updateRate parameter






$0F19

NSSetUserUpdate

Sets the user update routine










Note Sequencer




Note Sequencer Calls
Routine#Description
SeqBootInit$011AInitializes the Note Sequencer; called only by Tool Locator (not application)
SeqStartUp$021AStarts up the Note Sequencer for use by an application
SeqShutDown$031AShuts down the Note Sequencer
SeqVersion$041AReturns the version number of the Note Sequencer
SeqReset$051AResets the Note Sequencer; called only on reset (not by application)
SeqStatus$061AIndicates whether the Note Sequencer is active
SetIncr$091ASets the Note Sequencer's increment value - used for temp control of a sequence
ClearIncr$0A1ASets NS's increment value to zero, halting current sequence, & returns previous inc value
GetTimer$0B1AReturns the value of the Note Sequencer's tick counter
GetLoc$0C1AReturns certain info about the sequence that is playing
SeqAllNotesOff$0D1ASwitches off all notes that are playing but doesn't stop the sequence
SetTrkInfo$0E1AAssigns instruments in current instrument table to logical tracks, & determines priority
StartSeq$0F1AStarts interpretation of a series of seqItems stored at address specified by 'sequence'
StepSeq$101AAdvances Note Sequencer to next seqItem in current sequence, executing current seqItems
StopSeq$111AHalts interpretation of a series of seqItems
SetInstTable$121ASets the current instrument table to the one specified in instTable
StartInts$131AEnables interrupts - Restores normal functioning after call to StopInts
StopInts$141ADisables Note Synthesizer & Note Sequencer interrupts
StartSeqRel$151AThis call differs from StartSeq in that it uses relative addressing from the beginning of the sequence

Note Sequencer Calls


$011A

SeqBootInit

Initializes the Note Sequencer; called only by Tool Locator (not application)






$021A

SeqStartUp

Starts up the Note Sequencer for use by an application






$031A

SeqShutDown

Shuts down the Note Sequencer






$041A

SeqVersion

Returns the version number of the Note Sequencer






$051A

SeqReset

Resets the Note Sequencer; called only on reset (not by application)






$061A

SeqStatus

Indicates whether the Note Sequencer is active






$091A

SetIncr

Sets the Note Sequencer's increment value - used for temp control of a sequence






$0A1A

ClearIncr

Sets NS's increment value to zero, halting current sequence, & returns previous inc value






$0B1A

GetTimer

Returns the value of the Note Sequencer's tick counter






$0C1A

GetLoc

Returns certain info about the sequence that is playing






$0D1A

SeqAllNotesOff

Switches off all notes that are playing but doesn't stop the sequence






$0E1A

SetTrkInfo

Assigns instruments in current instrument table to logical tracks, & determines priority






$0F1A

StartSeq

Starts interpretation of a series of seqItems stored at address specified by 'sequence'






$101A

StepSeq

Advances Note Sequencer to next seqItem in current sequence, executing current seqItems






$111A

StopSeq

Halts interpretation of a series of seqItems






$121A

SetInstTable

Sets the current instrument table to the one specified in instTable






$131A

StartInts

Enables interrupts - Restores normal functioning after call to StopInts






$141A

StopInts

Disables Note Synthesizer & Note Sequencer interrupts






$151A

StartSeqRel

This call differs from StartSeq in that it uses relative addressing from the beginning of the sequence










Font Manager




Font Manager Calls
Routine#Description
FMBootInit$011BInitializes the Font Manager; called only by Tool Locator (not application)
FMStartUp$021BStarts up the Font Manager for use by an application
FMShutDown$031BShuts down the Font Manager
FMVersion$041BReturns the version number of the Font Manager
FMReset$051BResets the Font Manager; called only on reset (not by application)
FMStatus$061BIndicates whether the Font Manager is active
CountFamilies$091BReturns total # of distinct font families currently available to FM that match given spec
FindFamily$0A1BReturns the number and name of a particular font family
GetFamInfo$0B1BReturns family name & characteristics of a font family with a specified family number
GetFamNum$0C1BReturns the family number corresponding to a specified font family name
AddFamily$0D1BEnables application to add a family number & name to Font Manager's list of known fonts
InstallFont$0E1BFinds specified font or best fit if specified font isn't available; loads or scales; makes current
SetPurgeStat$0F1BMakes a specified font in memory purgeable or unpurgeable
CountFonts$101BReturns number of fonts currently available to Font Manager that fit a specified description
FindFontStats$111BReturns the font ID and the characteristics of a particular font
LoadFont$121BLoads a specified font into memory (if not already there) & make it current & unpurgeable
LoadSysFont$131BMakes the system font the current font
AddFontVar$141BEnables application to add variation of preexisting font family to FM's available fonts
FixFontMenu$151BAppends the names of available font families to a specified menu
ChooseFont$161BDisplays a dialog box enabling the user to select a new font, size, and style
ItemID2FamNum$171BTranslates the menu item ID into a font family number
FMSetSysFont$181BMakes a specified font the system font
FMGetSysFID$191BReturns the font ID of the system font
FMGetCurFID$1A1BReturns the font ID of the current font
FamNum2ItemID$1B1BTranslates a font family number into a menu item ID
InstallWithSta$1C1BInstalls a font & returns info about that font

Font Manager Calls


$011B

FMBootInit

Initializes the Font Manager; called only by Tool Locator (not application)






$021B

FMStartUp

Starts up the Font Manager for use by an application






$031B

FMShutDown

Shuts down the Font Manager






$041B

FMVersion

Returns the version number of the Font Manager






$051B

FMReset

Resets the Font Manager; called only on reset (not by application)






$061B

FMStatus

Indicates whether the Font Manager is active






$091B

CountFamilies

Returns total # of distinct font families currently available to FM that match given spec






$0A1B

FindFamily

Returns the number and name of a particular font family






$0B1B

GetFamInfo

Returns family name & characteristics of a font family with a specified family number






$0C1B

GetFamNum

Returns the family number corresponding to a specified font family name






$0D1B

AddFamily

Enables application to add a family number & name to Font Manager's list of known fonts






$0E1B

InstallFont

Finds specified font or best fit if specified font isn't available; loads or scales; makes current






$0F1B

SetPurgeStat

Makes a specified font in memory purgeable or unpurgeable






$101B

CountFonts

Returns number of fonts currently available to Font Manager that fit a specified description






$111B

FindFontStats

Returns the font ID and the characteristics of a particular font






$121B

LoadFont

Loads a specified font into memory (if not already there) & make it current & unpurgeable






$131B

LoadSysFont

Makes the system font the current font






$141B

AddFontVar

Enables application to add variation of preexisting font family to FM's available fonts






$151B

FixFontMenu

Appends the names of available font families to a specified menu






$161B

ChooseFont

Displays a dialog box enabling the user to select a new font, size, and style






$171B

ItemID2FamNum

Translates the menu item ID into a font family number






$181B

FMSetSysFont

Makes a specified font the system font






$191B

FMGetSysFID

Returns the font ID of the system font






$1A1B

FMGetCurFID

Returns the font ID of the current font






$1B1B

FamNum2ItemID

Translates a font family number into a menu item ID






$1C1B

InstallWithSta

Installs a font & returns info about that font










List Manager




List Manager Calls
Routine#Description
ListBootInit$011CInitializes the List Manager; called only by Tool Locater - not by application
ListStartup$021CStarts up the List Manager for use by an application
ListShutDown$031CShuts down the List Manager when an application quits
ListVersion$041CReturns the version number of the List Manager
ListReset$051CResets the List Manager; called only on system reset - not by application
ListStatus$061CIndicates whether the List Manager is active
CreateList$091CCreates a list control using a specified list record
SortList$0A1CAlphabetizes a specified list by rearranging the array of member records
NextMember$0B1CSearches specified list record, start w/specified member, & return ptr to member of nxt member found
DrawMember$0C1CDraws one or all members of a specified list
SelectMember$0D1CSelect specified member, deselects other select members in list, scrolls list & put specified on top
GetListDefProc$0E1CReturns a pointer to the list control's definition procedure
ResetMember$0F1CSearch specified list record, start w/first member, & returns ptr to member record, & deselects
NewList$101CResets the list control according to a specified list record
DrawMember2$111CDraws one or all members of a specified list
NextMember2$121CSearches a specified list record, returns the item number corresponding to the next selected item
ResetMember2$131CSearches a specified list control, returns the item number of the first selected member in the list
SelectMember2$141CSelects a specified member, deselects any other selected members of the list, scrolls the list display
SortList2$151CAlphabetizes a specified list by rearranging the array of member records
NewList2$161CResets the list control according to a specified list record
ListKey$171CAccepts keystrokes and jumps the selection around in the specified list appropriately
CompareStrings$181CCompareStrings compares two Pascal strings

List Manager Calls


$011C

ListBootInit

Initializes the List Manager; called only by Tool Locater - not by application






$021C

ListStartup

Starts up the List Manager for use by an application






$031C

ListShutDown

Shuts down the List Manager when an application quits






$041C

ListVersion

Returns the version number of the List Manager






$051C

ListReset

Resets the List Manager; called only on system reset - not by application






$061C

ListStatus

Indicates whether the List Manager is active






$091C

CreateList

Creates a list control using a specified list record






$0A1C

SortList

Alphabetizes a specified list by rearranging the array of member records






$0B1C

NextMember

Searches specified list record, start w/specified member, & return ptr to member of nxt member found






$0C1C

DrawMember

Draws one or all members of a specified list






$0D1C

SelectMember

Select specified member, deselects other select members in list, scrolls list & put specified on top






$0E1C

GetListDefProc

Returns a pointer to the list control's definition procedure






$0F1C

ResetMember

Search specified list record, start w/first member, & returns ptr to member record, & deselects






$101C

NewList

Resets the list control according to a specified list record






$111C

DrawMember2

Draws one or all members of a specified list






$121C

NextMember2

Searches a specified list record, returns the item number corresponding to the next selected item






$131C

ResetMember2

Searches a specified list control, returns the item number of the first selected member in the list






$141C

SelectMember2

Selects a specified member, deselects any other selected members of the list, scrolls the list display






$151C

SortList2

Alphabetizes a specified list by rearranging the array of member records






$161C

NewList2

Resets the list control according to a specified list record






$171C

ListKey

Accepts keystrokes and jumps the selection around in the specified list appropriately






$181C

CompareStrings

CompareStrings compares two Pascal strings










ACE Tool Set




ACE Tool Set Calls
Routine#Description
ACEBootInit$011DInitializes the ACE Tool Set; called only by Tool Locator (not by application)
ACEStartUp$021DStarts up the ACE Tool Set for use by an application
ACEShutDown$031DShuts down the ACE Tool Set when an application quits
ACEVersion$041DReturns the version number of the ACE Tool Set
ACEReset$051DResets the ACE Tool Set; called only on reset - not by application
ACEStatus$061DIndicates whether the ACE Tool Set is active
ACEInfo$071DReturns certain information about currently installed version of the ACE tools
ACECompress$091DCompresses equivalent of NBlks of blocks of digital audio data & stores at specified location
ACEExpand$0A1DDecompresses a previously compressed Audio Sample, using specified method, & stores at specified loc
ACECompBegin$0B1DPrepares the ACE tools to compress a new audio sequence
ACEExpBegin$0C1DPrepares ACE to expand a new sequence
ACEGetExpState$0D1DGets the first 16 bytes of the expansion buffer
ACESetExpState$0E1DCopies the first 16 bytes to the expansion buffer

ACE Tool Set Calls


$011D

ACEBootInit

Initializes the ACE Tool Set; called only by Tool Locator (not by application)






$021D

ACEStartUp

Starts up the ACE Tool Set for use by an application






$031D

ACEShutDown

Shuts down the ACE Tool Set when an application quits






$041D

ACEVersion

Returns the version number of the ACE Tool Set






$051D

ACEReset

Resets the ACE Tool Set; called only on reset - not by application






$061D

ACEStatus

Indicates whether the ACE Tool Set is active






$071D

ACEInfo

Returns certain information about currently installed version of the ACE tools






$091D

ACECompress

Compresses equivalent of NBlks of blocks of digital audio data & stores at specified location






$0A1D

ACEExpand

Decompresses a previously compressed Audio Sample, using specified method, & stores at specified loc






$0B1D

ACECompBegin

Prepares the ACE tools to compress a new audio sequence






$0C1D

ACEExpBegin

Prepares ACE to expand a new sequence






$0D1D

ACEGetExpState

Gets the first 16 bytes of the expansion buffer






$0E1D

ACESetExpState

Copies the first 16 bytes to the expansion buffer










ResourceManager




ResourceManager Calls
Routine#Description
ResourceBootIn$011EInitializes the Resource Manager
ResourceStartUp$021ENotifies the Resource Manager that an application wishes to open and use its own resource files
ResourceShutDown$031ENotifies the Resource Manager that an application is finished using its own resource files
ResourceVersion$041ERetrieves the Resource Manager version number
ResourceReset$051EResets the Resource Manager; issued only when the system is reset
ResourceStatus$061EReturns a flag indicating whether the Resource Manager is active
CreateResource$091EInitializes a resource fork with no resources
OpenResourceFile$0A1EOpens a specified resource file, making it the current file, and returns a unique file ID to the calling program
CloseResourceFile$0B1EUpdates a specified resource file, frees any memory used by the resource map and resources and closes the file
AddResource$0C1EAdds a resource to the current resource file
UpdateResource$0D1ETransfers modifications made to resources in memory to the appropriate resource file
LoadResource$0E1ELoads a resource into memory and returns a handle to that location
RemoveResource$0F1EDeletes a resource from its resource file and releases any memory used by the resource
MarkResourceCh$101EInstructs the Resource Manager to write the specified resource to disk the next time its resource file is updated
SetCurResource$111EMakes a specified resource file the current file
GetCurResource$121EReturns the file ID of the current resource file
SetCurResource$131ETells the Resource Manager that another application will now be issuing Resource Manager calls
GetCurResource$141EReturns the user ID for the application that is currently using the Resource Manager
HomeResourceFile$151EReturns the file ID of the resource file that contains a specified resource
WriteResource$161EDirects the Resource Manager to write a modified resource to its resource file
ReleaseResource$171ESets the purge level of the memory used by a resource
DetachResource$181EInstructs the Resource Manager to dispose of its control blocks for a specified resource
UniqueResource$191EReturns a unique resource ID for a specified resource type
SetResourceID$1A1EChanges the ID of a resource to a new value
GetResourceAtt$1B1EReturns the attributes word for a specified resource
SetResourceAtt$1C1ESets the attributes of a resource
GetResourceSiz$1D1EReturns the size of the specified resource
MatchResourceH$1E1EReturns the type and ID of a resource, given ahandle to that resource
GetOpenFileRef$1F1EReturns the GS/OS file reference number associated with the resource fork of an open resource file
CountTypes$201ECounts the number of different resource types in all resource files available to the calling program
GetIndType$211EFinds a resource type value by means of its index
CountResources$221ECounts the number of resources of a specified type in all resource files available to the calling program
GetIndResource$231EFinds a resource of a specified type by means of its index and returns the resource ID for that resource
SetResourceLoa$241EControls Resource Manager access to the disk when resources are loaded
SetResourceFil$251ESets the number of files the Resource Manager is to search during a search operation
GetMapHandle$261EReturns a handle to the resource map for a specified resource file
LoadAbsResourc$271ELoads a resource into a specified absolute memory location
ResourceConver$281EInstalls or removes a converter routine from either the application or system converter list
LoadResource2$291EIt is like LoadResource expect that it returns information about the previous state of the returned handle
RMFindeNamedRe$2A1ETakes a resource type and a resource name and finds the resource ID of the corresponding resource
RMGetResourceN$2B1EReturns the Pascal string name of the specified resource
RMLoadNamedRes$2C1ETakes a resource type and a resource name and loads the corresponding resource
RMSetResourceN$2D1ESets the name of the specified resource, first removing any existing name
OpenResourceFi$2E1EStarts the Resource Manager for you if it isn't already started under the specified user ID
CompactResourc$2F1EConsolidates all free blocks in an open resource file into a single free block at the end

ResourceManager Calls


$011E

ResourceBootIn

Initializes the Resource Manager






$021E

ResourceStartUp

Notifies the Resource Manager that an application wishes to open and use its own resource files






$031E

ResourceShutDown

Notifies the Resource Manager that an application is finished using its own resource files






$041E

ResourceVersion

Retrieves the Resource Manager version number






$051E

ResourceReset

Resets the Resource Manager; issued only when the system is reset






$061E

ResourceStatus

Returns a flag indicating whether the Resource Manager is active






$091E

CreateResource

Initializes a resource fork with no resources






$0A1E

OpenResourceFile

Opens a specified resource file, making it the current file, and returns a unique file ID to the calling program






$0B1E

CloseResourceFile

Updates a specified resource file, frees any memory used by the resource map and resources and closes the file






$0C1E

AddResource

Adds a resource to the current resource file






$0D1E

UpdateResource

Transfers modifications made to resources in memory to the appropriate resource file






$0E1E

LoadResource

Loads a resource into memory and returns a handle to that location






$0F1E

RemoveResource

Deletes a resource from its resource file and releases any memory used by the resource






$101E

MarkResourceCh

Instructs the Resource Manager to write the specified resource to disk the next time its resource file is updated






$111E

SetCurResource

Makes a specified resource file the current file






$121E

GetCurResource

Returns the file ID of the current resource file






$131E

SetCurResource

Tells the Resource Manager that another application will now be issuing Resource Manager calls






$141E

GetCurResource

Returns the user ID for the application that is currently using the Resource Manager






$151E

HomeResourceFile

Returns the file ID of the resource file that contains a specified resource






$161E

WriteResource

Directs the Resource Manager to write a modified resource to its resource file






$171E

ReleaseResource

Sets the purge level of the memory used by a resource






$181E

DetachResource

Instructs the Resource Manager to dispose of its control blocks for a specified resource






$191E

UniqueResource

Returns a unique resource ID for a specified resource type






$1A1E

SetResourceID

Changes the ID of a resource to a new value






$1B1E

GetResourceAtt

Returns the attributes word for a specified resource






$1C1E

SetResourceAtt

Sets the attributes of a resource






$1D1E

GetResourceSiz

Returns the size of the specified resource






$1E1E

MatchResourceH

Returns the type and ID of a resource, given ahandle to that resource






$1F1E

GetOpenFileRef

Returns the GS/OS file reference number associated with the resource fork of an open resource file






$201E

CountTypes

Counts the number of different resource types in all resource files available to the calling program






$211E

GetIndType

Finds a resource type value by means of its index






$221E

CountResources

Counts the number of resources of a specified type in all resource files available to the calling program






$231E

GetIndResource

Finds a resource of a specified type by means of its index and returns the resource ID for that resource






$241E

SetResourceLoa

Controls Resource Manager access to the disk when resources are loaded






$251E

SetResourceFil

Sets the number of files the Resource Manager is to search during a search operation






$261E

GetMapHandle

Returns a handle to the resource map for a specified resource file






$271E

LoadAbsResourc

Loads a resource into a specified absolute memory location






$281E

ResourceConver

Installs or removes a converter routine from either the application or system converter list






$291E

LoadResource2

It is like LoadResource expect that it returns information about the previous state of the returned handle






$2A1E

RMFindeNamedRe

Takes a resource type and a resource name and finds the resource ID of the corresponding resource






$2B1E

RMGetResourceN

Returns the Pascal string name of the specified resource






$2C1E

RMLoadNamedRes

Takes a resource type and a resource name and loads the corresponding resource






$2D1E

RMSetResourceN

Sets the name of the specified resource, first removing any existing name






$2E1E

OpenResourceFi

Starts the Resource Manager for you if it isn't already started under the specified user ID






$2F1E

CompactResourc

Consolidates all free blocks in an open resource file into a single free block at the end










MIDI Tool Set




MIDI Tool Set Calls
Routine#Description
MIDIBootInit$0120Initializes the MIDI Tool Set; called only by Tool Locator (not by application)
MIDIStartUp$0220Starts up the MIDI Tool Set for use by an application
MIDIShutDown$0320Shuts down the MIDI Tool Set when an application quits
MIDIVersion$0420Returns the version number of the MIDI Tool Set
MIDIReset$0520Resets the MIDI Tool Set; called only on reset - not by application
MIDIStatus$0620Indicates whether the MIDI Tool Set is active
MIDIControl$0920Performs 18 different control functions required by the MIDI Tool Set
MIDIDevice$0A20Allows an application to select, load, & unload device drivers for use with the tools
MIDIClock$0B20Controls operation of optional time-stamp clock - allows precise timing of events
MIDIInfo$0C20Returns certain information about the state of the MIDI Tools
MIDIReadPacket$0D20Returns length of a packet of MIDI data that was transferred from input buffer to array
MIDIWritePacke$0E20Queues specified MIDI packet into output buffer - returns # of bytes written, if successful

MIDI Tool Set Calls


$0120

MIDIBootInit

Initializes the MIDI Tool Set; called only by Tool Locator (not by application)






$0220

MIDIStartUp

Starts up the MIDI Tool Set for use by an application






$0320

MIDIShutDown

Shuts down the MIDI Tool Set when an application quits






$0420

MIDIVersion

Returns the version number of the MIDI Tool Set






$0520

MIDIReset

Resets the MIDI Tool Set; called only on reset - not by application






$0620

MIDIStatus

Indicates whether the MIDI Tool Set is active






$0920

MIDIControl

Performs 18 different control functions required by the MIDI Tool Set






$0A20

MIDIDevice

Allows an application to select, load, & unload device drivers for use with the tools






$0B20

MIDIClock

Controls operation of optional time-stamp clock - allows precise timing of events






$0C20

MIDIInfo

Returns certain information about the state of the MIDI Tools






$0D20

MIDIReadPacket

Returns length of a packet of MIDI data that was transferred from input buffer to array






$0E20

MIDIWritePacke

Queues specified MIDI packet into output buffer - returns # of bytes written, if successful










Text Edit Tool




Text Edit Tool Calls
Routine#Description
TEBootInit$0122Initializes TextEdit; called only by the Tool Locator
TEStartUp$0222Starts up the TextEdit Tool Set and prepares TextEdit for application use
TEShutDown$0322Frees memory used by TextEdit, not including memory used by individual TextEdit records
TEVersion$0422Retrieves the TextEdit version number
TEReset$0522Resets TextEdit; called only when the system is reset
TEStatus$0622Returns a flag indicating whether TextEdit is active
TENew$0922Allocates a new TextEdit record in the current port and returns the TERecord defining that record
TEKill$0A22Deallocates a TERecord and all associated memory
TESetText$0B22Replaces the text in a TextEdit record, including style information, with supplied text and style data
TEGetText$0C22Returns the text from a TextEdit record, including the style information associated with that text
TEGetTextInfo$0D22Returns an information record, of variable size, describing a TextEdit record
TEIdle$0E22Provides processor time so that TextEdit can cause the cursor to blink and can perform other background tasks
TEActivate$0F22Makes the specified TextEdit record active-that is, makes that record the target of user keystrokes
TEDeactivate$1022Deactivates a TextEdit record
TEClick$1122Tracks the pointer within a TextEdit record, selecting all text that it passes over until the user releases the mouse button
TEUpdate$1222Redraws the screen for a TextEdit record
TEPaintText$1322Prints the text from a TextEdit record
TEKey$1422Processes a keystroke for a TextEdit record
TEUndo$1522This routine does nothing
TECut$1622Copies the current selection from the active TextEdit record to the Clipboard, destroying its previous contents
TECopy$1722Copies the current selection from the active TextEdit record to the Clipboard, destroying its previous contents
TEPaste$1822Replaces the current selection with the contents of the Clipboard, including both text and style information
TEClear$1922Clears the current selection in the active TextEdit record and redraws the screen
TEInsert$1A22Inserts a block of text before the current selection in a TextEdit record and redraws the text screen
TEReplace$1B22Replaces the current selection in a TextEdit record with a specified block of text and redraws the text screen
TEGetSelection$1C22Returns information defining the current selection for a TextEdit record
TESetSelection$1D22Sets the current selection for a TextEdit record
TEGetSelection$1E22Returns all style information for the text in the current selection in a TextEdit record.
TEStyleChange$1F22Changes the style information for the current selection in a TextEdit record
TEOffsetToPoin$2022Converts a text byte offset into a pixel position expressed in the local coordinates of the GrafPort
TEPointToOffse$2122Converts a pixel position into a text byte offset to the text for the record
TEGetDefProc$2222Returns the address of the TextEdit control definition procedure
TEGetRuler$2322Returns the ruler definition for a TextEdit record
TESetRuler$2422Sets the ruler for a TextEdit record
TEScroll$2522Causes the text in a TextEdit record to scroll
TEGetInternalP$2622Returns a pointer to the low-level procedure routine for TextEdit
TEGetLastError$2722Returns the last error code generated for a TextEdit record
TECompactRecor$2822Compresses all the TextEdit data structures in a specified TextEdit record

Text Edit Tool Calls


$0122

TEBootInit

Initializes TextEdit; called only by the Tool Locator






$0222

TEStartUp

Starts up the TextEdit Tool Set and prepares TextEdit for application use






$0322

TEShutDown

Frees memory used by TextEdit, not including memory used by individual TextEdit records






$0422

TEVersion

Retrieves the TextEdit version number






$0522

TEReset

Resets TextEdit; called only when the system is reset






$0622

TEStatus

Returns a flag indicating whether TextEdit is active






$0922

TENew

Allocates a new TextEdit record in the current port and returns the TERecord defining that record






$0A22

TEKill

Deallocates a TERecord and all associated memory






$0B22

TESetText

Replaces the text in a TextEdit record, including style information, with supplied text and style data






$0C22

TEGetText

Returns the text from a TextEdit record, including the style information associated with that text






$0D22

TEGetTextInfo

Returns an information record, of variable size, describing a TextEdit record






$0E22

TEIdle

Provides processor time so that TextEdit can cause the cursor to blink and can perform other background tasks






$0F22

TEActivate

Makes the specified TextEdit record active-that is, makes that record the target of user keystrokes






$1022

TEDeactivate

Deactivates a TextEdit record






$1122

TEClick

Tracks the pointer within a TextEdit record, selecting all text that it passes over until the user releases the mouse button






$1222

TEUpdate

Redraws the screen for a TextEdit record






$1322

TEPaintText

Prints the text from a TextEdit record






$1422

TEKey

Processes a keystroke for a TextEdit record






$1522

TEUndo

This routine does nothing






$1622

TECut

Copies the current selection from the active TextEdit record to the Clipboard, destroying its previous contents






$1722

TECopy

Copies the current selection from the active TextEdit record to the Clipboard, destroying its previous contents






$1822

TEPaste

Replaces the current selection with the contents of the Clipboard, including both text and style information






$1922

TEClear

Clears the current selection in the active TextEdit record and redraws the screen






$1A22

TEInsert

Inserts a block of text before the current selection in a TextEdit record and redraws the text screen






$1B22

TEReplace

Replaces the current selection in a TextEdit record with a specified block of text and redraws the text screen






$1C22

TEGetSelection

Returns information defining the current selection for a TextEdit record






$1D22

TESetSelection

Sets the current selection for a TextEdit record






$1E22

TEGetSelection

Returns all style information for the text in the current selection in a TextEdit record.






$1F22

TEStyleChange

Changes the style information for the current selection in a TextEdit record






$2022

TEOffsetToPoin

Converts a text byte offset into a pixel position expressed in the local coordinates of the GrafPort






$2122

TEPointToOffse

Converts a pixel position into a text byte offset to the text for the record






$2222

TEGetDefProc

Returns the address of the TextEdit control definition procedure






$2322

TEGetRuler

Returns the ruler definition for a TextEdit record






$2422

TESetRuler

Sets the ruler for a TextEdit record






$2522

TEScroll

Causes the text in a TextEdit record to scroll






$2622

TEGetInternalP

Returns a pointer to the low-level procedure routine for TextEdit






$2722

TEGetLastError

Returns the last error code generated for a TextEdit record






$2822

TECompactRecor

Compresses all the TextEdit data structures in a specified TextEdit record










ProDOS 16




ProDOS 16 Calls
Routine#Description
CREATE$0100Creates a standard file, extended file, or subdirectory file on a volume
DESTROY$0200Deletes a specified standard, extended, or subdir file & updates file system to show deletion
CHANGE_PATH$0400Changes a file's pathname to another pathname on the same volume, or renames a volume
SET_FILE_INFO$0500Sets certain file attributes of existing block file & immediately modifies directory entry
GET_FILE_INFO$0600Returns certain file attributes of existing block file
VOLUME$0800Returns name of volume mounted in specified device along with other info about volume
SET_PREFIX$0900Sets one of the number pathname prefixes to a specified value
GET_PREFIX$0A00Returns current value of any one of the numbered prefixes
CLEAR_BACKUP_BI$0B00Alters a file's state info to indicate file has been backed up & not altered since backup
OPEN$1000Causes GS/OS to establish an access path to a file & allows subsequent reads & writes
NEWLINE$1100Enables or disables the newline read mode for an open file & specified enable mask & character
READ$1200Attempts to transfer # of bytes requested, starting at current mark, into file buffer
WRITE$1300Attempts to transfer # bytes specified from applications buffer to the specified file, at mark
CLOSE$1400Closes access path to specified file, releasing all resources & buffered data for file
FLUSH$1500Writes to volume all file state info that's buffered in mem but not yet written to volume
SET_MARK$1600Sets the file mark to a specified value (position where next byte will be accessed)
GET_MARK$1700Returns the current file mark for the specified file
SET_EOF$1800Sets logical size of open file to specified value which may be larger or smaller than current
GET_EOF$1900Returns current logical size of a specified file
SET_LEVEL$1A00Sets current value of the system file level
GET_LEVEL$1B00Returns current value of system file level
GET_DIR_ENTRY$1C00Returns info about a directory entry in the volume directory or a subdirectory
GET_DEV_NUMBER$2000Returns device number of a device identifed by device name or volume name
GET_LAST_DEV$2100Returns the device number of the last accessed device (use with caution)
READ_BLOCK$2200Reads one 512-byte block of information from disk specified by device number
WRITE_BLOCK$2300Writes one 512-byte block of information to disk specified by device number
FORMAT$2400Puts up dialog box that allows user to physically format a volume & chose file system
ERASE_DISK$2500Puts up dialog box that allows user to erase a specified volume (does not physically format)
GET_NAME$2700Returns the filename (not complete pathname) of currently running application program
GET_BOOT_VOL$2800Returns volume name of volume from wich the file GS/OS was last loaded & executed (*/)
QUIT$2900Terminates the running application, closes all open files, then launches next application
GET_VERSION$2A00Returns the version number of the GS/OS operating system
D_INFO$2C00Returns general information about a device attached to the system (devNum & devName)
ALLOC_INTERRUPT$3100Places address of an interrupt handler into GS/OS interrupt vector table
DEALLOC_INTERRU$3200Removes a specified interrupt handler from the interrupt vector table

ProDOS 16 Calls


$0100

CREATE

Creates a standard file, extended file, or subdirectory file on a volume






$0200

DESTROY

Deletes a specified standard, extended, or subdir file & updates file system to show deletion






$0400

CHANGE_PATH

Changes a file's pathname to another pathname on the same volume, or renames a volume






$0500

SET_FILE_INFO

Sets certain file attributes of existing block file & immediately modifies directory entry






$0600

GET_FILE_INFO

Returns certain file attributes of existing block file






$0800

VOLUME

Returns name of volume mounted in specified device along with other info about volume






$0900

SET_PREFIX

Sets one of the number pathname prefixes to a specified value






$0A00

GET_PREFIX

Returns current value of any one of the numbered prefixes






$0B00

CLEAR_BACKUP_BI

Alters a file's state info to indicate file has been backed up & not altered since backup






$1000

OPEN

Causes GS/OS to establish an access path to a file & allows subsequent reads & writes






$1100

NEWLINE

Enables or disables the newline read mode for an open file & specified enable mask & character






$1200

READ

Attempts to transfer # of bytes requested, starting at current mark, into file buffer






$1300

WRITE

Attempts to transfer # bytes specified from applications buffer to the specified file, at mark






$1400

CLOSE

Closes access path to specified file, releasing all resources & buffered data for file






$1500

FLUSH

Writes to volume all file state info that's buffered in mem but not yet written to volume






$1600

SET_MARK

Sets the file mark to a specified value (position where next byte will be accessed)






$1700

GET_MARK

Returns the current file mark for the specified file






$1800

SET_EOF

Sets logical size of open file to specified value which may be larger or smaller than current






$1900

GET_EOF

Returns current logical size of a specified file






$1A00

SET_LEVEL

Sets current value of the system file level






$1B00

GET_LEVEL

Returns current value of system file level






$1C00

GET_DIR_ENTRY

Returns info about a directory entry in the volume directory or a subdirectory






$2000

GET_DEV_NUMBER

Returns device number of a device identifed by device name or volume name






$2100

GET_LAST_DEV

Returns the device number of the last accessed device (use with caution)






$2200

READ_BLOCK

Reads one 512-byte block of information from disk specified by device number






$2300

WRITE_BLOCK

Writes one 512-byte block of information to disk specified by device number






$2400

FORMAT

Puts up dialog box that allows user to physically format a volume & chose file system






$2500

ERASE_DISK

Puts up dialog box that allows user to erase a specified volume (does not physically format)






$2700

GET_NAME

Returns the filename (not complete pathname) of currently running application program






$2800

GET_BOOT_VOL

Returns volume name of volume from wich the file GS/OS was last loaded & executed (*/)






$2900

QUIT

Terminates the running application, closes all open files, then launches next application






$2A00

GET_VERSION

Returns the version number of the GS/OS operating system






$2C00

D_INFO

Returns general information about a device attached to the system (devNum & devName)






$3100

ALLOC_INTERRUPT

Places address of an interrupt handler into GS/OS interrupt vector table






$3200

DEALLOC_INTERRU

Removes a specified interrupt handler from the interrupt vector table










GS/OS




GS/OS Calls
Routine#Description
CreateGS$0120Creates a standard file, extended file, or subdirectory file on a volume
DestroyGS$0220Deletes a specified standard, extended, or subdir file & updates file system to show deletion
OSShutdownGS$0320Allows application to shut down OS in prep for power down or cold reboot of machine
Change_PathGS$0420Changes a file's pathname to another pathname on the same volume, or change name of volume
Set_File_InfoGS$0520Sets certain file attributes of existing block file & immediately modifies directory entry
Get_File_InfoGS$0620Returns certain file attributes of existing block file
JudgeNameGS$0720Allows the caller to verify the syntax of a file name, directory name or volume name
VolumeGS$0820Returns name of volume mounted in specified device along with other info about volume
Set_PrefixGS$0920Sets one of the number pathname prefixes to a specified value
Get_PrefixGS$0A20Returns current value of any one of the numbered prefixes
Clear_BackupGS$0B20Sets file's state info to indicate that file has been backed up & not altered since backup
Set_Sys_PrefsGS$0C20Sets value of current global system preferences - values affect behavior of sys calls
NullGS$0D20Executes any pending events in Scheduler & GS/OS event queue - flushes queues
Expand_PathGS$0E20Converts input pathname into full pathname with ':' as separators, optionally changin case
Get_Sys_PrefsGS$0F20Returns value of current global system preferences - values affect behavior of sys calls
OpenGS$1020Causes GS/OS to establish an access path to a file & allows subsequent reads & writes
NewLineGS$1120Enables or disables newline read mode for an open file, & specified enable mask & character
ReadGS$1220Attempts to transfer # of bytes requested, starting at current mark, into file buffer
WriteGS$1320Attempts to transfer # bytes specified from applications buffer to the specified file, at mark
CloseGS$1420Closes access path to specified file, releasing all resources & buffered data for file
FlushGS$1520Writes to volume all file state info that's buffered in mem but not yet written to volume
Set_MarkGS$1620Sets the file mark to a specified value (position where next byte will be accessed)
Get_MarkGS$1720Returns the current file mark for the specified file
Set_EOFGS$1820Sets logical size of open file to specified value which may be larger or smaller than current
Get_EOFGS$1920Returns current logical size of a specified file
Set_LevelGS$1A20Sets current value of the system file level
Get_LevelGS$1B20Returns the current value of the system file level
Get_Dir_EntryGS$1C20Returns info about a directory entry in the volume directory or a subdirectory
Begin_SessionGS$1D20Tells GS/OS to begin deferring block writes to disk - block cache until EndSession
End_SessionGS$1E20Flushes any deferred block writes occuring during write-deferral session & resume norm
Session_StatusG$1F20Returns a value that tells if a write-deferral session is in progress
Get_Dev_NumberG$2020Returns device number of a device identifed by device name or volume name
Get_Last_DevGS$2120Returns the device number of the last accessed device (use with caution)
FormatGS$2420Puts up dialog box that allows user to physically format a volume & chose file system
Erase_DiskGS$2520Puts up dialog box that allows user to erase a specified volume (does not physically format)
ResetCacheGS$2620Provides a way to resize the GS/OS cache and be able to use the resized cache immediately
Get_NameGS$2720Returns the filename (not complete pathname) of currently running application program
Get_Boot_VolGS$2820Returns volume name of volume from wich the file GS/OS was last loaded & executed (*/)
QuitGS$2920Terminates the running application, closes all open files, then launches next application
Get_VersionGS$2A20Returns the version number of the GS/OS operating system
Get_FST_InfoGS$2B20Returns general information about a specified File System Translator
D_InfoGS$2C20Returns general information about a device attached to the system
D_StatusGS$2D20Returns status information about a specified device
D_ControlGS$2E20Sends control info to a specified device
D_ReadGS$2F20Performs a device-level read on a specified device
D_WriteGS$3020Performs a device-level write to a specified device
Bind_IntGS$3120Places address of an interrupt handler into GS/OS's interrupt vector table
Unbind_IntGS$3220Removes a specified interrupt handler from the interrupt vector table
FSTSpecificGS$3320Call that can be defined individually for any file system translator
AddNotifyProcGS$3420Adds a notification queue to the notification queue
DelNotifyProcGS$3520Removes a notification procedure from the notification queue
D_RenameGS$3620Replaces a device name as specificed in a device information block
GetRefInfoGS$3920Returns the access attributes and full pathname for an open file when the reference number is given as input
SetStdRefNumGS$3A20Allows the caller to explicitly set the reference number associated with one of the standard I/O channels

GS/OS Calls


$0120

CreateGS

Creates a standard file, extended file, or subdirectory file on a volume






$0220

DestroyGS

Deletes a specified standard, extended, or subdir file & updates file system to show deletion






$0320

OSShutdownGS

Allows application to shut down OS in prep for power down or cold reboot of machine






$0420

Change_PathGS

Changes a file's pathname to another pathname on the same volume, or change name of volume






$0520

Set_File_InfoGS

Sets certain file attributes of existing block file & immediately modifies directory entry






$0620

Get_File_InfoGS

Returns certain file attributes of existing block file






$0720

JudgeNameGS

Allows the caller to verify the syntax of a file name, directory name or volume name






$0820

VolumeGS

Returns name of volume mounted in specified device along with other info about volume






$0920

Set_PrefixGS

Sets one of the number pathname prefixes to a specified value






$0A20

Get_PrefixGS

Returns current value of any one of the numbered prefixes






$0B20

Clear_BackupGS

Sets file's state info to indicate that file has been backed up & not altered since backup






$0C20

Set_Sys_PrefsGS

Sets value of current global system preferences - values affect behavior of sys calls






$0D20

NullGS

Executes any pending events in Scheduler & GS/OS event queue - flushes queues






$0E20

Expand_PathGS

Converts input pathname into full pathname with ':' as separators, optionally changin case






$0F20

Get_Sys_PrefsGS

Returns value of current global system preferences - values affect behavior of sys calls






$1020

OpenGS

Causes GS/OS to establish an access path to a file & allows subsequent reads & writes






$1120

NewLineGS

Enables or disables newline read mode for an open file, & specified enable mask & character






$1220

ReadGS

Attempts to transfer # of bytes requested, starting at current mark, into file buffer






$1320

WriteGS

Attempts to transfer # bytes specified from applications buffer to the specified file, at mark






$1420

CloseGS

Closes access path to specified file, releasing all resources & buffered data for file






$1520

FlushGS

Writes to volume all file state info that's buffered in mem but not yet written to volume






$1620

Set_MarkGS

Sets the file mark to a specified value (position where next byte will be accessed)






$1720

Get_MarkGS

Returns the current file mark for the specified file






$1820

Set_EOFGS

Sets logical size of open file to specified value which may be larger or smaller than current






$1920

Get_EOFGS

Returns current logical size of a specified file






$1A20

Set_LevelGS

Sets current value of the system file level






$1B20

Get_LevelGS

Returns the current value of the system file level






$1C20

Get_Dir_EntryGS

Returns info about a directory entry in the volume directory or a subdirectory






$1D20

Begin_SessionGS

Tells GS/OS to begin deferring block writes to disk - block cache until EndSession






$1E20

End_SessionGS

Flushes any deferred block writes occuring during write-deferral session & resume norm






$1F20

Session_StatusG

Returns a value that tells if a write-deferral session is in progress






$2020

Get_Dev_NumberG

Returns device number of a device identifed by device name or volume name






$2120

Get_Last_DevGS

Returns the device number of the last accessed device (use with caution)






$2420

FormatGS

Puts up dialog box that allows user to physically format a volume & chose file system






$2520

Erase_DiskGS

Puts up dialog box that allows user to erase a specified volume (does not physically format)






$2620

ResetCacheGS

Provides a way to resize the GS/OS cache and be able to use the resized cache immediately






$2720

Get_NameGS

Returns the filename (not complete pathname) of currently running application program






$2820

Get_Boot_VolGS

Returns volume name of volume from wich the file GS/OS was last loaded & executed (*/)






$2920

QuitGS

Terminates the running application, closes all open files, then launches next application






$2A20

Get_VersionGS

Returns the version number of the GS/OS operating system






$2B20

Get_FST_InfoGS

Returns general information about a specified File System Translator






$2C20

D_InfoGS

Returns general information about a device attached to the system






$2D20

D_StatusGS

Returns status information about a specified device






$2E20

D_ControlGS

Sends control info to a specified device






$2F20

D_ReadGS

Performs a device-level read on a specified device






$3020

D_WriteGS

Performs a device-level write to a specified device






$3120

Bind_IntGS

Places address of an interrupt handler into GS/OS's interrupt vector table






$3220

Unbind_IntGS

Removes a specified interrupt handler from the interrupt vector table






$3320

FSTSpecificGS

Call that can be defined individually for any file system translator






$3420

AddNotifyProcGS

Adds a notification queue to the notification queue






$3520

DelNotifyProcGS

Removes a notification procedure from the notification queue






$3620

D_RenameGS

Replaces a device name as specificed in a device information block






$3920

GetRefInfoGS

Returns the access attributes and full pathname for an open file when the reference number is given as input






$3A20

SetStdRefNumGS

Allows the caller to explicitly set the reference number associated with one of the standard I/O channels