Adapted to new assembler syntax

This commit is contained in:
ceriel 1987-01-30 19:20:31 +00:00
parent 1b09e55129
commit c03c2ef9f2
2 changed files with 12 additions and 13 deletions

View file

@ -17,13 +17,11 @@ con_part(sz,w) register sz; word w; {
} }
con_mult(sz) word sz; { con_mult(sz) word sz; {
long l; long atol();
if (sz != 4) if (sz != 4)
fatal("bad icon/ucon size"); fatal("bad icon/ucon size");
l = atol(str); fprintf(codefile,".data4 %ld\n", atol(str));
fprintf(codefile,".short\t%d\n",(int) l);
fprintf(codefile,".short\t%d\n",(int) (l >> 16));
} }
@ -76,8 +74,8 @@ mes(type) word type; {
} }
char *segname[] = { char *segname[] = {
".text", /* SEGTXT */ ".sect .text", /* SEGTXT */
".data", /* SEGCON */ ".sect .data", /* SEGCON */
".data", /* SEGROM */ ".sect .rom", /* SEGROM */
".bss" /* SEGBSS */ ".sect .bss" /* SEGBSS */
}; };

View file

@ -16,11 +16,12 @@
#define hol_off "%d+hol%d" #define hol_off "%d+hol%d"
#define con_cst(x) fprintf(codefile,".word\t%d\n",x) #define con_cst(x) fprintf(codefile,".data2\t%d\n",x)
#define con_ilb(x) fprintf(codefile,".word\t%s\n",x) #define con_ilb(x) fprintf(codefile,".data2\t%s\n",x)
#define con_dlb(x) fprintf(codefile,".word\t%s\n",x) #define con_dlb(x) fprintf(codefile,".data2\t%s\n",x)
#define modhead "" #define modhead ".sect .zero; .sect .text; .sect .rom; .sect .data; .sect .bss\n"
#define fmt_id(ft, fs) sprintf(fs,"_%s",ft)
#define id_first '_'
#define BSS_INIT 0 #define BSS_INIT 0