From 455bbfaee694f3f57f2cf1e4f85dcedc42d893e3 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Thu, 23 Jun 2016 19:53:14 +0100 Subject: [PATCH] scc: fix wrong direction stack mod on Z80 Still not well - the stack offsets for arguments appear to be ignoring the pushed return code. --- Applications/SmallC/Makefile | 2 +- Applications/SmallC/codez80.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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); -- 2.34.1