Fix register corruption when incrementing locals; attempt to solve the

alignment issue.
This commit is contained in:
David Given 2019-06-17 23:31:54 +02:00
parent c2f48772e9
commit 97e6baa052
4 changed files with 16 additions and 12 deletions

View file

@ -7,7 +7,8 @@
#define in_ap(y) /* nothing */
#define newilb(x) fprintf(codefile,"%s:\n",x)
#define newdlb(x) fprintf(codefile,"%s:\n",x)
#define newdlb(x) fprintf(codefile,".align 2\n%s:\n",x)
#define newplb(x) fprintf(codefile,".align 2\n%s:\n", x)
#define dlbdlb(x,y) fprintf(codefile,"%s = %s\n",x,y)
#define newlbss(l,x) fprintf(codefile,".comm %s,%u\n",l,x);

View file

@ -1089,6 +1089,7 @@ with hl_or_de
gen dcx %1 yields %1
pat del
kills dereg, hlreg
uses hlreg={const2,$1}
gen
dad lb

View file

@ -10,10 +10,10 @@
.sect .data
.sect .bss
MAX_ARGV = 8
MAX_ARGV = 10
.sect .bss
STACKSIZE = 2*1024
STACKSIZE = 512
.comm stack, STACKSIZE
.sect .text
@ -140,6 +140,7 @@ __exit:
saved_sp = . + 1
lxi sp, 0 ! patched on startup
ret
.align 2
! Emergency exit routine.
@ -181,7 +182,8 @@ _cpm_cmdline = 0x0081
! Used to store the argv array.
argc: .space 1 ! number of args
.sect .bss
argc: .space 2 ! number of args
argv0: .space 2 ! always points at progname
argv: .space 2*MAX_ARGV ! argv array (must be after argv0)
envp: .space 2 ! envp array (always empty, must be after argv)
@ -195,7 +197,7 @@ envp: .space 2 ! envp array (always empty, must be after argv)
.comm .retadr, 2 ! used to save return address
.comm .retadr1, 2 ! reserve
.comm .bcreg, 2
.comm .areg, 1
.comm .areg, 2
.comm .tmp1, 2
.comm .fra, 8 ! 8 bytes function return area
block1: .space 4 ! used by 32 bits divide and

View file

@ -3,19 +3,19 @@
# $Revision$
var w=2
var wa=1
var wa=2
var p=2
var pa=1
var pa=2
var s=2
var sa=1
var sa=2
var l=4
var la=1
var la=2
var f=4
var fa=1
var fa=2
var d=8
var da=1
var da=2
var x=8
var xa=1
var xa=2
var ARCH=i86
var PLATFORM=pc86
var PLATFORMDIR={EM}/share/ack/{PLATFORM}