Menu

#2977 Z80 Inline assembler label issue

closed-fixed
nobody
None
Z80
5
2022-03-10
2020-02-10
No

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;
}
1 Attachments

Related

Bugs: #3591

Discussion

  • Sebastian Riedel

    Looks like being a duplicate of [#2831]

     

    Related

    Bugs: #2831


    Last edit: Maarten Brock 2022-03-04
  • Sebastian Riedel

    • status: open --> closed-fixed
     
  • Sebastian Riedel

    Fixed in [r13121]

     

Log in to post a comment.

MongoDB Logo MongoDB