Adapted to new assembler syntax

This commit is contained in:
ceriel 1987-01-20 10:04:32 +00:00
parent a410519ff5
commit feea5a269f
2 changed files with 13 additions and 12 deletions

View file

@ -41,7 +41,7 @@ con_mult(sz) word sz; {
if (sz != 4) if (sz != 4)
fatal("bad icon/ucon size"); fatal("bad icon/ucon size");
fprintf(codefile,"\t.long %s\n", str); fprintf(codefile,"\t.data4 %s\n", str);
} }
con_float() { con_float() {
@ -49,7 +49,7 @@ con_float() {
static int been_here; static int been_here;
if (argval != 4 && argval != 8) if (argval != 4 && argval != 8)
fatal("bad fcon size"); fatal("bad fcon size");
fprintf(codefile,"\t.long "); fprintf(codefile,"\t.data4 ");
if (argval == 8) if (argval == 8)
fprintf(codefile,"F_DUM, "); fprintf(codefile,"F_DUM, ");
fprintf(codefile,"F_DUM\n"); fprintf(codefile,"F_DUM\n");
@ -100,8 +100,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

@ -8,17 +8,18 @@
#define cst_fmt "%d" #define cst_fmt "%d"
#define off_fmt "%d" #define off_fmt "%d"
#define ilb_fmt "I%03x%x" #define ilb_fmt "I%x_%x"
#define dlb_fmt "_%d" #define dlb_fmt "_%d"
#define hol_fmt "hol%d" #define hol_fmt "hol%d"
#define hol_off "%d+hol%d" #define hol_off "%d+hol%d"
#define con_cst(x) fprintf(codefile,"\t.word %d\n",x) #define con_cst(x) fprintf(codefile,"\t.data2 %d\n",x)
#define con_ilb(x) fprintf(codefile,"\t.word %s\n",x) #define con_ilb(x) fprintf(codefile,"\t.data2 %s\n",x)
#define con_dlb(x) fprintf(codefile,"\t.word %s\n",x) #define con_dlb(x) fprintf(codefile,"\t.data2 %s\n",x)
#define modhead "" #define modhead ".sect .text; .sect .rom; .sect .data; .sect .bss\n"
#define fmt_id(sf,st) sprintf(st,"_%s", sf)
#define id_first '_'
#define BSS_INIT 0 #define BSS_INIT 0