Menu

#3490 #line in assembler with peep-asm

open
nobody
None
other
5
2022-09-19
2022-09-19
Under4Mhz
No

When using --peep-asm with the following code, the asm output ends up with a "#line" which is then not recognised by the assembler. It works if I don't specify --peep-asm.

sdcc -mz80 --peep-asm ./peep-asm.c -c
peep-asm.asm:56: Error: <q> missing or improper operators, terminators, or delimiters
removing peep-asm.rel
/// GPL 2.0 or later
int mult24u8x16( int b, int a ) __naked {

    (void)a;
    (void)b;

    __asm

#ifdef SDCC_STACK_ABI
        ld      d, #0
        ld      e, a
#elif defined CPU_GBZ80
        ld      b, h
        ld      c, l
#else
        ld      l, a
#endif
        ret

    __endasm;

    return 0;
}
_mult24u8x16::
;./peep-asm.c:13: ld      b, h
    #line   16 "./peep-asm.c"
    ret
;./peep-asm.c:15: #else
    ld  de, #0x0000
;./peep-asm.c:16: ld      l, a
1 Attachments

Discussion


Log in to post a comment.

Auth0 Logo