ADC Home > Reference Library > Technical Notes > Legacy Documents > Networking >

Legacy Documentclose button

Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.

Current information on this Reference Library topic can be found here:

Opening AppleTalk


This Technical Note describes the most effective, safe, and compatible way to open the AppleTalk drivers, .MPP and .ATP.

[Feb 01 1989]


The process of opening the AppleTalk drivers, .MPP and .ATP, can be greatly simplified. The AppleTalk Manager chapters of Inside Macintosh describe the calls MPPOpen and ATPLoad for use by high-level languages. They also describe the process of examining low-memory globals SPConfig and PortBUse before calling _Open for assembly language use of AppleTalk.

Starting with the 128K ROM, the .MPP driver already has all the code built in for checking the low-memory globals SPConfig and PortBUse before trying to complete the _Open call. Furthermore, the .MPP driver will automatically open the .ATP driver as part of its opening process. Therefore, since all of the required checks are made inside the driver itself, we recommend that a simple _Open call be made to the .MPP driver when you need to use AppleTalk. In a high-level language like Pascal, this call would look like the following:

In C:

And in assembly language:

openAT    SUB.W    #ioQElSize,SP    ; Make space for paramblock on stack
            ; since _Open is always synchronous.
            ;  Using .W is slightly more efficient
            ; and is safe since ioQElSize is small.
    MOVE.L    SP,A0    ; Point A0 to paramblock.
    LEA    mppName,A1    ; Point A1 to driver name.
    MOVE.L    A1,ioFileName(A0); Put pointer to name in paramblock.
    CLR.B    ioPermssn(A0)    ; Clear so won't look like OpenDeskAcc.
    MOVE.W    ioRefNum(A0),D1    ;You might want this later. Who knows?
    ADD.W    #ioQElSize,SP    ; Reclaim space on stack.
    RTS        ; D0 contains result code.

mppName    DC.B    4

By using just the simple _Open call to the .MPP driver, you can ensure that your code will be compatible with future versions of AppleTalk that might not make use of low-memory globals.


Inside Macintosh, Volumes II-261, IV-229, & V-507, The AppleTalk Manager


Acrobat gif

Acrobat version of this Note (32K)


Back to top

Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.