|
From: <pa...@pj...> - 2001-05-20 23:09:58
|
Johan, thanks for fixing the inline asm size limit. It's working
great, even after I added a couple hundred more lines in that function.
I ran into another strange problem. Here is some code that
reproduces it:
unsigned char asm_line(void)
{
_asm
mov a, #10
#if 0
mov a, #9
#endif
mov dpl, a
label_at_end:
_endasm;
}
The whitespace matters... I used tabs. If you change the tabs
to spaces, it will compile. If you add a blank line between the
move to DPL and the label, it will compile. Also, if you delete
the three lines that ought to be swallowed up by the preprocessor,
it will compile. Because it's so easy to make the problem
disappear with a change to the white space, here's a copy of the
original file:
http://www.pjrc.com/tmp/err.tar.gz
Looking at the assembly output, it appears like the compiler
replaces all but the first few characters of "label_at_end" with
some binary garbage, and then the assembler chokes on it.
I'm also seeing another (prehaps related) problem where sometimes
the compiler will put lines like:
#line 516 "printf.c"
in the middle of the inline assembly, which asx8051 doesn't
appreciate, instead of the correct assembly syntax like:
; printf.c 51
I'll try to find a simple test case. So far I can only make it
happen with my ever-growing assembly printf code.
Paul
|