Re: Weird 8051 assembler code generated by SDCC
- From: Roberto Waltman <usenet@xxxxxxxxxxxx>
- Date: Thu, 30 Mar 2006 10:36:22 -0500
"Desert Rat" <rhunt@xxxxxxxxxxxxxxxxxx> wrote:
I am using SDCC on a 8051 project and the C code uses a switchI am not familiar with that assembler and compiler, so this is just a
statement which has some in-line assembler code in several spots. The
program compiles without any errors, but the assembler generates a
dozen or so "undefined symbol encountered during assembly" errors. The
errors all had to do with jump statements...
...
On each of those lines, the assembler claims the label
'00111$' is undefined. But you can see that the label '00111$' exists
at address 0179h (line 404). I have checked that it is the only symbol
with that name in the assembler code. But what is even more odd is
that on line 396 (about eight lines above the label) is another jump to
that same label, that did not generate an error, and the jump op code
is there with a legitimate address for '00111$'.
...
guess: Some assemblers support labels with a limited scope, to make
easier to generate temporary labels. (for destination of 'if'
statement branches, etc.) You can have several identical labels with
no conflict, since each one will be valid only between a limited range
of lines in the file. These labels have a special syntax, an the
"00???$" format suggests this. Their range is usually terminated by
"normal" labels.
So this is the guess: something in your in-line assembly (labels
probably) is terminating the range of the compiler generated
limited-scope labels, so the jump statements so no see them.
Try removing them temporarily to see if that is the case.
.
- Follow-Ups:
- Re: Weird 8051 assembler code generated by SDCC
- From: Roberto Waltman
- Re: Weird 8051 assembler code generated by SDCC
- References:
- Weird 8051 assembler code generated by SDCC
- From: Desert Rat
- Weird 8051 assembler code generated by SDCC
- Prev by Date: Re: Weird 8051 assembler code generated by SDCC
- Next by Date: Re: Weird 8051 assembler code generated by SDCC
- Previous by thread: Re: Weird 8051 assembler code generated by SDCC
- Next by thread: Re: Weird 8051 assembler code generated by SDCC
- Index(es):
Relevant Pages
|
Loading