adapted to new assembler syntax

This commit is contained in:
ceriel 1987-02-04 15:09:31 +00:00
parent 6dcf1995c1
commit a0dad9f908
2 changed files with 19 additions and 6 deletions

View file

@ -45,12 +45,12 @@ con_part(sz,w) register sz; word w; {
}
con_mult(sz) word sz; {
long l;
long l, atol();
if (sz != 4)
fatal("bad icon/ucon size");
#ifdef ACK_ASS
fprintf(codefile,".long %s\n",str);
fprintf(codefile,".data4 %s\n",str);
#else
l = atol(str);
fprintf(codefile,"\t%o;%o\n",(int)(l>>16),(int)l);
@ -70,7 +70,7 @@ con_float() {
if (argval != 4 && argval != 8)
fatal("bad fcon size");
fprintf(codefile,".long\t");
fprintf(codefile,".data4\t");
if (argval == 8)
fprintf(codefile,"F_DUM,");
fprintf(codefile,"F_DUM\n");
@ -236,8 +236,15 @@ mes(type) word type; {
}
char *segname[] = {
#ifdef ACK_ASS
".sect .text", /* SEGTXT */
".sect .data", /* SEGCON */
".sect .rom", /* SEGROM */
".sect .bss" /* SEGBSS */
#else
".text", /* SEGTXT */
".data", /* SEGCON */
".data", /* SEGROM */
".bss" /* SEGBSS */
#endif
};

View file

@ -33,14 +33,20 @@
#define hol_off "0%o+hol%d"
#ifdef ACK_ASS
#define con_cst(x) fprintf(codefile,".short 0%o\n",x)
#define con_ilb(x) fprintf(codefile,".short %s\n",x)
#define con_dlb(x) fprintf(codefile,".short %s\n",x)
#define con_cst(x) fprintf(codefile,".data2 0%o\n",x)
#define con_ilb(x) fprintf(codefile,".data2 %s\n",x)
#define con_dlb(x) fprintf(codefile,".data2 %s\n",x)
#else
#define con_cst(x) fprintf(codefile,"0%o\n",x)
#define con_ilb(x) fprintf(codefile,"%s\n",x)
#define con_dlb(x) fprintf(codefile,"%s\n",x)
#endif
#ifdef ACK_ASS
#define modhead ".sect .text; .sect .rom; .sect .data; .sect .bss\n"
#define fmt_id(f,t) sprintf(t,"_%s",f)
#else
#define id_first '_'
#endif
#define BSS_INIT 0