From: Alan Cox Date: Thu, 23 Jun 2016 18:53:14 +0000 (+0100) Subject: scc: fix wrong direction stack mod on Z80 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=455bbfaee694f3f57f2cf1e4f85dcedc42d893e3;p=FUZIX.git scc: fix wrong direction stack mod on Z80 Still not well - the stack offsets for arguments appear to be ignoring the pushed return code. --- diff --git a/Applications/SmallC/Makefile b/Applications/SmallC/Makefile index d15bf11f..37aa9b5a 100644 --- a/Applications/SmallC/Makefile +++ b/Applications/SmallC/Makefile @@ -35,7 +35,7 @@ copt: $(OBJ_COPT) $(CC) -o copt $(OBJ_COPT) clean: - rm -f $(OBJ) scc8080 *.rel *~ + rm -f $(OBJ) scc8080 sccz80 scc6801 scc6809 *.rel *~ .c.rel: $(CC) $(COPT) $(CFLAGS) -c $< -o $@ diff --git a/Applications/SmallC/codez80.c b/Applications/SmallC/codez80.c index 68a83b71..667e9255 100644 --- a/Applications/SmallC/codez80.c +++ b/Applications/SmallC/codez80.c @@ -402,7 +402,7 @@ int gen_modify_stack(int newstkp) { k++; } while (k) { - output_line ("pop bc"); + output_line ("push bc"); k = k + INTSIZE; } return (newstkp);