GestaltTalk/GestaltTalkSelector.c

/*
 
    GestaltTalkSelector.c
    ---------------------
    
    This selector returns the address to GestaltTalk globals,
    which includes a pointer to the data buffer.
    
*/
 
pascal OSErr GestaltTalkGestalt(long selector, long *response)
{
    
    asm {
            bsr.s   @skipStorage        ; skip over the data and push address
            dc.l    0x00                ; this is the gestaltTalk globals record
            dc.l    0x00                ;
            dc.l    0x00
            dc.l    0x00
            dc.l    0x00
        @skipStorage:
            movea.l response,a0
            move.l  (sp)+,(a0)          ; put the address of data into response
    }
    return  0;
}