From a0dad9f908be5943a663e74c7e4bf7bb72f8acc0 Mon Sep 17 00:00:00 2001 From: ceriel Date: Wed, 4 Feb 1987 15:09:31 +0000 Subject: [PATCH] adapted to new assembler syntax --- mach/pdp/cg/mach.c | 13 ++++++++++--- mach/pdp/cg/mach.h | 12 +++++++++--- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/mach/pdp/cg/mach.c b/mach/pdp/cg/mach.c index 24602f09d..07fd94450 100644 --- a/mach/pdp/cg/mach.c +++ b/mach/pdp/cg/mach.c @@ -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 }; diff --git a/mach/pdp/cg/mach.h b/mach/pdp/cg/mach.h index eae2d5790..92b9cf755 100644 --- a/mach/pdp/cg/mach.h +++ b/mach/pdp/cg/mach.h @@ -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 -- 2.34.1