NEW AUTO 3,1 *-------------------------------------- CC.Link >LDYA L.MSG.LINKING >SYSCALL Puts ldy #0 lda #0 .1 >STYA ZPPtr1 SymID >PUSHB.G CC.hScopes >PUSHW ZPPtr1 SymID >PUSHW pData >SYSCALL SListGetByID bcs .8 >STYA ZPPtr2 NextID >PUSHB.G CC.hScopes >PUSHW ZPPtr1 SymID >PUSHW ZPSymBufPtr >PUSHWI $ffff All >PUSHWZ from Start >SYSCALL SListGetData bcs .9 ldy #SYM.Addr+1 lda (ZPSymBufPtr),y dey ora (ZPSymBufPtr),y bne .6 jsr CC.Link.LIBC bcc .6 jsr CC.Link.Dump lda #E.FUNDEF sec bra .9 .6 >LDA.G bTrace bpl .7 jsr CC.Link.Dump bcs .9 .7 >LDYA ZPPtr2 jmp .1 .8 clc .9 rts *-------------------------------------- * Input : pData = Symbol *-------------------------------------- CC.Link.LIBC >LDYA L.CC.LIBC >STYA ZPLookupPtr ldy #$ff .10 iny lda (pData),y bne .10 phy Symbol Len ldx #0 .1 lda (ZPLookupPtr) beq .9 Ending 0, not found.... pla pha Get Back Len cmp (ZPLookupPtr) Same Len ? bne .4 tay .2 lda (ZPLookupPtr),y dey cmp (pData),y bne .4 tya bne .2 lda (ZPLookupPtr) jsr CC.ZPLookupPtrAddAp1 Skip LEN\Symbol ldy #2 Skip LEN lda (ZPLookupPtr),y pha dey lda (ZPLookupPtr),y ply jsr CC.SYM.SetAddrYA plx >PUSHB.G CC.hScopes >PUSHW ZPPtr1 SymID >PUSHW ZPSymBufPtr >PUSHBI 0 ldy #SYM.DefSize lda (ZPSymBufPtr),y >PUSHA >SYSCALL SListSetData rts .4 inx inx lda (ZPLookupPtr) jsr CC.ZPLookupPtrAddAp1 Skip LEN\Symbol lda (ZPLookupPtr) jsr CC.ZPLookupPtrAddAp1 Skip LEN\definition bra .1 .9 plx sec rts *-------------------------------------- CC.Link.Dump >PUSHW L.MSG.LINKING2 >PUSHW ZPPtr1 ID >PUSHW pData Name >PUSHB (ZPSymBufPtr) SYM.T ldy #1 >PUSHB (ZPSymBufPtr),y SYM.Q iny >PUSHB (ZPSymBufPtr),y SYM.SC iny >PUSHB (ZPSymBufPtr),y SYM.DefSize ldy #SYM.SizeOf+1 >PUSHB (ZPSymBufPtr),y dey >PUSHB (ZPSymBufPtr),y ldy #SYM.Addr+1 >PUSHB (ZPSymBufPtr),y dey >PUSHB (ZPSymBufPtr),y >PUSHBI 12 >SYSCALL PrintF rts *-------------------------------------- *-------------------------------------- MAN SAVE usr/src/bin/cc.s.link LOAD usr/src/bin/cc.s ASM