Specifications
Developer Technical Support May 1990
Apple IIGS
#69: The Ins and Outs of Slot Arbitration 5 of 7
device before it gets control. However, there are some applications (such as peripheral card
configuration programs) which go directly to firmware or hardware, not using GS/OS. Perhaps
the card has no ROM, so there is no generated driver, or perhaps there is no loaded driver and the
generated driver does not control certain aspects of the hardware. In any case, such applications
are directly impacted by slot arbitration.
Slot Searching
The first problem is finding the hardware. In a 14-slot system, it’s not suitable to just look for ID
bytes between $C100 and $C700—two peripherals may be sharing each of those pages of slot
ROM space. Drivers must examine all 14 slots, with the aid of the Slot Arbiter. The following
sample code demonstrates this technique:
find_slot lda #$8000 ; request current Bit Encoded Slot
Configuration
jsl slot_arbiter
phx ; save it on the stack
lda #$000F ; start with slot 15
sta slot_number ; be sure of the data bank when doing this!
slot_search lda slot_number ; get the slot number to examine
jsl slot_arbiter ; and ask for it
bcs continue_search ; if an error, then don’t look here
jsr check_for_hw ; this routine looks for your hardware
bcc found_my_hw ; if found it, we’re done searching
continue_search dec slot_number ; try the next lower slot
bpl slot_search ; (if there are any left, of course)
found_my_hw plx ; get Bit Encoded Slot Configuration from
stack
lda #$0300 ; and tell the Slot Arbiter to restore from
it
jsl slot_arbiter
; We’re done. Our slot number is in the location slot_number.
Note: You must restore the previous slot configuration when searching for a slot. This
is vital to device drivers during the Drvr_Startup call, and failure to do so at
other times may break older, seven-slot applications.
The Slot Arbiter attempts to maintain a static seven-slot system for applications as reflected by
the user’s Control Panel settings. This system allows older applications to continue to work, as
something they find in an older, seven-slot scan is still present. Newer applications may wish to
consider implementing a 14-slot scan, but any slot not present in the static seven-slot
environment requires a call to the Slot Arbiter before and after every access to that device. The
overhead in such instances may be intolerable. Apple recommends that if an application requires
hardware that cannot be found in a seven-slot scan, it request the user to set the Control Panel to
make the hardware available and restart the system.
Using Slot-Dependent Hardware
Applications which have slot dependencies must call the Slot Arbiter before each use of the slot
in question. Since Slot Arbitration changes the environment to which Apple IIGS programs have










