When I compile the following function as a .c file, it compiles fine. But when I compile it to a .SRC file, and then have it assembled, the symbol ?SC_0 is undefined. This symbol is apparently a compiler generated symbol, so why should it be undefined? It exists when I compile with the C compiler, so I know it's OK for it to be there. Is there any workaround for this? I'm already including C51l.lib - do I need to include another lib? Anyway, here is the code snippet: void DownloadFirmware ( unsigned char far * flAddr ) { Byte * startOfRAM; Byte * topOfRAM; // for loader code that will // be running in RAM Ushort addr, new_addr, delta, i ; Uchar lo_byte ; Uchar* index ; Uchar instruction ; Uchar length; Uchar instr_len [ ] = { 1, 2, 3, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 3, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 3, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; And generated code: 00000B 7800 F 509 MOV R0,#LOW (instr_len?051) 00000D 7C00 F 510 MOV R4,#HIGH (instr_len?051) 00000F 511 MOV R5,#?SC_0 *** ________________________________________________^ *** ERROR #A45 IN 511 (downloadfirm.src, LINE 511): UNDEFINED SYMBOL 000011 7B00 F 512 MOV R3,#BYTE2 (_?ix1000) 000013 7A00 F 513 MOV R2,#HIGH (_?ix1000) 000015 7900 F 514 MOV R1,#LOW (_?ix1000) 000017 7E01 515 MOV R6,#01H 000019 7F00 516 MOV R7,#00H 00001B 120000 E 517 LCALL ?C?COPY Thanks, Ed
versions?