Files
Shawn Quick dfcaae62dd Add qlink, the disk tools, and a bootable ProDOS 8 image.
Move the assembler to src/qasm. qlink links OMF 1.0 and 2.0 from a script. makeBin flattens a load file, qomf dumps OMF, and qpro builds ProDOS volumes. APW and MPW assemble through the ORCA front end. Relocatable modules emit OMF objects. Listings stay off unless -l is set.

make boot assembles the GS/OS 6.0.1 ProDOS 8 kernel and BASIC.SYSTEM into an 800K volume. BASIC.SYSTEM accepts ls and pfx, and its splash reports PRODOS BASIC 2.0, copyright 1983-2026. IIGS.601.SRC is the source and the BASIC.SYSTEM oracle that image is built from.
2026-10-16 14:41:55 -07:00

1 line
12 KiB
Plaintext

*******************************************************************************
*
* Copyright Apple Computer, Inc 1990-1993
* All Rights Reserved
*
*******************************************************************************
**********************************************************************
*
* RequestNames
*
* This file contains the procedure and data to convert a request code
* into a name.
*
* There are two procedures that are entry points in this file:
*
* GetRequestName - Returns a pointer to a CString that is the
* name of the request specified.
*
* GetRequestNumber - Returns a word that is the request number from
* the name of the request.
*
**********************************************************************
*
* REVISION HISTORY
*
* For GSBug 1.7dx (System 6.0.1)
*
* 27-Mar-93 JCM - Started this from toolnames.aii.
*
**********************************************************************
import UnkStr
import UnknownStr
include 'dsect.macros'
string C
MACRO
ToolCall &NameStr,&CallNumber
c&CallNumber dc.b '&NameStr'
MEND
****************************************************************
*
GetRequestName PROC EXPORT
*
* Returns a pointer to the specified call name.
*
* The call is made as follows:
*
* pha
* pha
* PushWord #RequestNumber
* jsl GetRequestName
* PullLong ThePointer
*
* Inputs:
* space for long
* RequestNumber : word
*
* Outputs:
* carry = 1 iff request name is unknown
* Pointer to CString
*
* External Refs:
* none
*
longa on ; mode
longi on
*
****************************************************************
DefineStack
OrigDirect word
RTLAdr block 3
RequestNumber word
ResultPtr long
phd
tsc
tcd
phb
phk
plb
lda <RequestNumber ;look at group number in call number
xba
and #$00FF
asl a
cmp NamePointerTable
bcs @noSuchRequest
tax ;use 2 times request number to get pointer
lda NamePointerTable+2,x ; to table of names for this request group
sta <ResultPtr ; put result in ResultPtr
lda RequestNumber ; now look at the low byte of the request number
and #$00FF
asl a ; use 2 times request number to see if request
cmp (<ResultPtr) ; exists
bcs @noSuchRequest
tay ; use number to get pointer to name
iny
iny ;since we allow a group of zero
lda (<ResultPtr),y
clc ; Indicate request name found
@exitGetRequestName sta <ResultPtr ; store in result ptr
phk ; now put bank into result pointer
phk
pla
and #$00FF
sta <ResultPtr+2
ldx <RTLAdr+1 ; move rtl adr up 2 bytes
stx <RTLAdr+1+2
ldx <RTLAdr
stx <RTLAdr+2
plb ; restore dbr
pld ; restore d-reg
plx ; pull off word
rtl ; fini
@noSuchRequest lda #UnknownStr
sec ;Indicate that no tool name found.
bra @exitGetRequestName
********************************************************************************
*
* GetRequestNumber
*
* Usage:
* pha ;space for result
* pushlong #str ;input string
* jsl GetRequestNumber
* pla ;result (0 if not found)
*
********************************************************************************
export GetRequestNumber
import EqualString
GetRequestNumber
DefineStack
OrigD word
SectCounter word
RequestCounter word
Ptr word
RTLAddress block 3
StringPtr long
ResultRequestNumber word
pha ;three words of locals
pha
pha
phd
tsc
tcd
phb
phk
plb
stz <ResultRequestNumber ;assume not found
stz <SectCounter
@sectLoop inc <SectCounter
lda <SectCounter
asl a ;for table index
cmp NamePointerTable
bge @exitGetRequestNumber ;we didn't find the string
tax
lda NamePointerTable,x
sta <Ptr
stz <RequestCounter
@callLoop inc <RequestCounter
lda <RequestCounter
asl a
cmp (<Ptr)
bcs @sectLoop ;we're done with this table
tay
lda (<Ptr),y
phk
phk
pha
lda 3,s
and #$00FF
sta 3,s
pei <StringPtr+2
pei <StringPtr
jsr EqualString
bcc @callLoop
lda <SectCounter
dec a
xba
ora <RequestCounter
dec a
sta <ResultRequestNumber
@exitGetRequestNumber ldx <RTLAddress+1 ;move rtl adr up 4 bytes
stx <RTLAddress+1+4
ldx <RTLAddress
stx <RTLAddress+4
plb
pld
plx ;pull off 3 locals
plx
plx
plx ;pull off long string pointer
plx
rtl
;---------------------------------------------------------------------------------
;
; Name Pointer Table
;
; This table points to the table of pointers to names of calls in each request "group".
; For request codes in user-defined range, there is a bit of overloading on some requests.
;
NamePointerTable
dc.w EndNPT-NamePointerTable
dc.w Group00
dc.w Group01
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w Group05
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w Group0F
dc.w GroupUnused
dc.w GroupUnused
dc.w Group12
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w Group80
dc.w GroupUnused
dc.w Group82
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w GroupUnused
dc.w Group90
EndNPT
* System-sent requests/sent-to system requests
ToolCall systemSaysBeep,0001
ToolCall systemSaysUnknownDisk,0002
ToolCall srqGoAway,0003
ToolCall srqGetrSoundSample,0004
ToolCall srqSynchronize,0005
ToolCall srqPlayrSoundSample,0006
ToolCall systemSaysNewDeskMsg,0008
ToolCall systemSaysDoClipboard,000C
ToolCall systemSaysForceUndim,000D
ToolCall systemSaysEjectingDev,000E
* Finder-sent requests
ToolCall finderSaysHello,0100
ToolCall finderSaysGoodbye,0101
ToolCall finderSaysSelectionChanged,0102
ToolCall finderSaysMItemSelected,0103
ToolCall finderSaysBeforeOpen,0104
ToolCall finderSaysOpenFailed,0105
ToolCall finderSaysBeforeCopy,0106
ToolCall finderSaysIdle,0107
ToolCall finderSaysExtrasChosen,0108
ToolCall finderSaysBeforeRename,0109
ToolCall finderSaysKeyHit,010A
* Desk Manager-sent requests
ToolCall systemSaysDeskStartUp,0502
ToolCall systemSaysDeskShutDown,0503
ToolCall systemSaysFixedAppleMenu,051E
* Menu Manager-sent requests
ToolCall systemSaysMenuKey,0F01
* QuickDraw Auxilliary-sent requests
ToolCall systemSaysGetSysIcon,1201
* Requests accepted by Apple~EasyMount~
ToolCall srqMountServer,18000 ;1 for uniqueness
* Requests sent to Apple~Finder~
ToolCall tellFinderGetDebugInfo,8000
ToolCall askFinderAreYouThere,8001
ToolCall tellFinderOpenWindow,8002
ToolCall tellFinderCloseWindow,8003
ToolCall tellFinderGetSelectedIcons,8004
ToolCall tellFinderSetSelectedIcons,8005
ToolCall tellFinderLaunchThis,8006
ToolCall tellFinderShutDown,8007
ToolCall tellFinderMItemSelected,8008
ToolCall tellFinderMatchFileToIcon,800A
ToolCall tellFinderAddBundle,800B
ToolCall tellFinderAboutChange,800C
ToolCall tellFinderCheckDatabase,800D
ToolCall tellFinderColorSelection,800E
ToolCall tellFinderAddToExtras,800F
ToolCall askFinderIdleHowLong,8011
ToolCall tellFinderGetWindowIcons,8012
ToolCall tellFinderGetWindowInfo,8013
ToolCall tellFinderRemoveFromExtras,8014
ToolCall tellFinderSpecialPreferences,8015
* Requests accepted by Apple~SoundCP~
ToolCall srqConvertRelPitch,8200
* Requests accepted by Apple~Control Panel~
ToolCall cpOpenCDev,9000
ToolCall cpOpenControlPanels,9001
Group00 dc.w Group00End-Group00
dc.w UnkStr
dc.w c0001 ;systemSaysBeep
dc.w c0002 ;systemSaysUnknownDisk
dc.w c0003 ;srqGoAway
dc.w c0004 ;srqGetrSoundSample
dc.w c0005 ;srqSynchronize
dc.w c0006 ;srqPlayrSoundSample
dc.w UnkStr
dc.w c0008 ;systemSaysNewDeskMsg
dc.w UnkStr
dc.w UnkStr
dc.w UnkStr
dc.w c000C ;systemSaysDoClipboard
dc.w c000D ;systemSaysForceUndim
dc.w c000E ;systemSaysEjectingDev
Group00End
Group01 dc.w Group01End-Group01
dc.w c0100 ;finderSaysHello
dc.w c0101 ;finderSaysGoodbye
dc.w c0102 ;finderSaysSelectionChanged
dc.w c0103 ;finderSaysMItemSelected
dc.w c0104 ;finderSaysBeforeOpen
dc.w c0105 ;finderSaysOpenFailed
dc.w c0106 ;finderSaysBeforeCopy
dc.w c0107 ;finderSaysIdle
dc.w c0108 ;finderSaysExtrasChosen
dc.w c0109 ;finderSaysBeforeRename
dc.w c010A ;finderSaysKeyHit
Group01End
Group05 dc.w Group05End-Group05
dc.w UnkStr
dc.w UnkStr
dc.w c0502 ;systemSaysDeskStartUp
dc.w c0503 ;systemSaysDeskShutDown
dc.w UnkStr
dc.w UnkStr
dc.w UnkStr
dc.w UnkStr
dc.w UnkStr
dc.w UnkStr
dc.w UnkStr
dc.w UnkStr
dc.w UnkStr
dc.w UnkStr
dc.w UnkStr
dc.w UnkStr
dc.w UnkStr
dc.w UnkStr
dc.w UnkStr
dc.w UnkStr
dc.w UnkStr
dc.w UnkStr
dc.w UnkStr
dc.w UnkStr
dc.w UnkStr
dc.w UnkStr
dc.w UnkStr
dc.w UnkStr
dc.w UnkStr
dc.w UnkStr
dc.w c051E ;systemSaysFixedAppleMenu
Group05End
Group0F dc.w Group0FEnd-Group0F
dc.w UnkStr
dc.w c0F01 ;systemSaysMenuKey
Group0FEnd
Group12 dc.w Group12End-Group12
dc.w UnkStr
dc.w c1201 ;systemSaysGetSysIcon
Group12End
Group80 dc.w Group80End-Group80
dc.w c8000 ;tellFinderGetDebugInfo
dc.w c8001 ;askFinderAreYouThere
dc.w c8002 ;tellFinderOpenWindow
dc.w c8003 ;tellFinderCloseWindow
dc.w c8004 ;tellFinderGetSelectedIcons
dc.w c8005 ;tellFinderSetSelectedIcons
dc.w c8006 ;tellFinderLaunchThis
dc.w c8007 ;tellFinderShutDown
dc.w c8008 ;tellFinderMItemSelected
dc.w UnkStr
dc.w c800A ;tellFinderMatchFileToIcon
dc.w c800B ;tellFinderAddBundle
dc.w c800C ;tellFinderAboutChange
dc.w c800D ;tellFinderCheckDatabase
dc.w c800E ;tellFinderColorSelection
dc.w c800F ;tellFinderAddToExtras
dc.w UnkStr
dc.w c8011 ;askFinderIdleHowLong
dc.w c8012 ;tellFinderGetWindowIcons
dc.w c8013 ;tellFinderGetWindowInfo
dc.w c8014 ;tellFinderRemoveFromExtras
dc.w c8015 ;tellFinderSpecialPreferences
Group80End
Group82 dc.w Group82End-Group82
dc.w c8200 ;srqConvertRelPitch
Group82End
Group90 dc.w Group90End-Group90
dc.w c9000 ;cpOpenCDev
dc.w c9001 ;cpOpenControlPanels
Group90End
GroupUnused dc.w GroupUnusedEnd-GroupUnused
GroupUnusedEnd
RequestTargets
AppleFinder dc.b 'Apple~Finder~'
AppleControlPanel dc.b 'Apple~Control Panel~'
AppleSoundCP dc.b 'Apple~SoundCP~'
AppleEasyMount dc.b 'Apple~EasyMount~'
ENDP
END