adapted to new assembler syntax
authorceriel <none@none>
Wed, 4 Feb 1987 15:09:31 +0000 (15:09 +0000)
committerceriel <none@none>
Wed, 4 Feb 1987 15:09:31 +0000 (15:09 +0000)
mach/pdp/cg/mach.c
mach/pdp/cg/mach.h

index 24602f0..07fd944 100644 (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
 };
index eae2d57..92b9cf7 100644 (file)
 #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