I've attached a simple project that fails to build giving the following error with the inline z80 assembler:
info 218: z80instructionSize() failed to parse line node, assuming 999 bytes
However if you coment out one of a couple of lines of C code before the inline assembly, it works fine.
There's a makefile with the command line used to build it, but for reference it's:
$(SDCC) -mz80 --stack-auto --std-c99 -c $< -o $@
and here's the C file with comments clarifying the problem:
int fn()
{
return 0;
}
void asmTest()
{
// The asm code below fails with:
//
// info 218: z80instructionSize() failed to parse line node, assuming 999 bytes
//
// unless you....
int r = fn();
if (r != 0)
{
fn(); // ... comment out this ...
return; // ... or this ...
}
// ... and then this work.
__asm
ld HL,#1$
1$:
__endasm;
}
Looks like being a duplicate of [#2831]
Related
Bugs:
#2831Last edit: Maarten Brock 2022-03-04
Fixed in [r13121]