scc: fix wrong direction stack mod on Z80
authorAlan Cox <alan@linux.intel.com>
Thu, 23 Jun 2016 18:53:14 +0000 (19:53 +0100)
committerAlan Cox <alan@linux.intel.com>
Thu, 23 Jun 2016 18:53:14 +0000 (19:53 +0100)
Still not well - the stack offsets for arguments appear to be ignoring the pushed
return code.

Applications/SmallC/Makefile
Applications/SmallC/codez80.c

index d15bf11..37aa9b5 100644 (file)
@@ -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 $@
index 68a83b7..667e925 100644 (file)
@@ -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);