AppleTalk Undocumented Functionality

Here is some AppleTalk functionality not documented in the APDA Apple II AppleShare Programmer's Guide.

Init (function $01)

The APDA documentation mentions the Init function, then says never to call it and gives no parameter list for it. Here is its parameter list:

Pos Name Size Value
$00 Async Flag Byte $00 (Synchronous only)
$01 Command Byte $01
$02 Result Code Word
$04 Init flags Byte See below.
$05 P8 Entry Long P8 MLI entry address
$09 Node number Byte Preferred node number or $00
$0A Unknown Word ?

Init flags:

Value Function
$00 Partial init, no MLI global page update
Used during netboot
$80 Full init, no MLI global page update
Used during IIgs boot
$40 Full init, MLI global page update
Used by ATINIT and boot block LOGON

To initialize AppleTalk just enough to do ATP when ProDOS is not loaded, set up an IRQ handler that does JSR $Cn19 followed by RTI (where n is the slot number of the Workstation Card) and issue the init call with all parameters 0 except for the command byte of $01, then do JSR $Cn14 in the manner of a ProDOS MLI call to initialize it. When it returns, enable interrupts. Example code is in NetBoot LC.

To initalize AppleTalk for use by ProDOS (in, say, an ATINIT file), you must make the call with init flags = $40 and the P8 entry address as $0000BF00. After the init call returns success the following must take place: Use the ProDOS 8 ALLOC_INTERRUPT to allocate an interrupt routine with $Cn19 as the routine address, then update the global page MLI vector to go to $Cn14, and finally, enable interrupts.

FIUserPrefix (function $2A)

The Reserved byte high bit is a direction indicator and is used by the LOGON program to set the User Prefix when a user volume is mounted.

Specifically, Logon sets it to $AA, but only the high bit matters.