Hi folks! I need to rewrite my Z80 library to the new calling convention. In the following function the simple 'ret' doesnt work anymore: extern void colorup( unsigned char argn, unsigned char foreground, unsigned char background); .globl _colorup _colorup:: ; bring parameters to correct mem/registers ld (#ARGN), a push hl ; save L ld hl, #6 add hl, sp ld e, (hl) pop hl ; retore L call PV1 ; system call .db FNCOLORUP ret Now it is necessary to change the 'ret' to this code pop hl inc sp jp (hl) to...
Great, it works! Thank you!
Ok, with myprintf( "%x %x %x", (char)a, (char)b, (char)c); variant 1 works. And also the workaround with c = va_arg( arg, unsigned); does help. But my second compile with the compile option '--fomit-frame-pointer' is still completly garbled up. Can anyone give a hint in which sdcc source files a can search for the problem? thanks & regards, Bert
program
second attempt
va_arg (printf) fail completly on target Z80
Mea culpa! The error message guide me wrong, obviously. Best regards, Bert
sdasz80 has problem with LD H,0