conversion to new assembler syntax

This commit is contained in:
ceriel 1987-01-16 17:17:12 +00:00
parent c6ace07201
commit f9f1db874f
2 changed files with 18 additions and 15 deletions

View file

@ -27,7 +27,7 @@ con_mult(sz)
{
if (sz != 4)
fatal("bad icon/ucon size");
fprintf(codefile,".long\t%s\n",str);
fprintf(codefile,".data4\t%s\n",str);
}
#ifdef REGVARS
@ -75,7 +75,7 @@ f_regsave(){
fprintf(codefile,"%c%s", c, regadm[i].ra_str);
c = ',';
}
fprintf(codefile, "], %d\n", lbytes);
fprintf(codefile, "], %ld\n", lbytes);
for (i=0;i<n_regvars;i++)
if (regadm[i].ra_off>=0)
fprintf(codefile, "movd %ld(fp), %s",
@ -129,17 +129,17 @@ mes(type) word type ; {
prolog(nlocals) full nlocals; {
#ifndef REGVARS
fprintf(codefile, "enter[], %d\n",nlocals);
fprintf(codefile, "enter[], %ld\n",nlocals);
#else
lbytes = nlocals;
#endif
}
char *segname[] = {
".text",
".data",
".data",
".bss"
".sect .text",
".sect .data",
".sect .rom",
".sect .bss"
};
con_float() {

View file

@ -6,19 +6,22 @@
#define newilb(x) fprintf(codefile,"%s:\n",x)
#define newdlb(x) fprintf(codefile,"%s:\n",x)
#define dlbdlb(x,y) fprintf(codefile,"%s = %s\n",x,y)
#define newlbss(l,x) fprintf(codefile,"%s:.space\t%d\n",l,x);
#define newlbss(l,x) fprintf(codefile,"%s:.space\t%ld\n",l,x);
#define cst_fmt "%d"
#define off_fmt "%d"
#define cst_fmt "%ld"
#define off_fmt "%ld"
#define ilb_fmt "I%03x%x"
#define dlb_fmt "_%d"
#define hol_fmt "hol%d"
#define hol_off "%d+hol%d"
#define hol_off "%ld+hol%d"
#define con_cst(x) fprintf(codefile,".long\t%d\n",x)
#define con_ilb(x) fprintf(codefile,".long\t%s\n",x)
#define con_dlb(x) fprintf(codefile,".long\t%s\n",x)
#define con_cst(x) fprintf(codefile,".data4\t%ld\n",x)
#define con_ilb(x) fprintf(codefile,".data4\t%s\n",x)
#define con_dlb(x) fprintf(codefile,".data4\t%s\n",x)
#define fmt_id(fr,to) sprintf(to, "_%s", fr)
#define modhead ".sect .text; .sect .rom; .sect .data; .sect .bss\n"
#define id_first '_'
#define BSS_INIT 0