Pristine Ack-5.5
[Ack-5.5.git] / mach / pdp / cg / mach.h
1 /*
2  * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
3  * See the copyright notice in the ACK home directory, in the file "Copyright".
4  */
5 /* $Id: mach.h,v 2.11 1994/06/24 13:11:45 ceriel Exp $ */
6
7 /* The next define switches between codegeneration for an ACK assembler
8  * or for the standard UNIX V7 assembler.
9  * If on code is generated for the ACK assembler.
10  */
11 #define ACK_ASS /* code for ACK assembler */
12
13 #ifdef ACK_ASS
14 #define COMMENTCHAR '!'
15 #define ex_ap(y)        fprintf(codefile,".extern %s\n",y)
16 #else
17 #define COMMENTCHAR '/'
18 #define ex_ap(y)        fprintf(codefile,".globl %s\n",y)
19 #endif
20 #define in_ap(y)        /* nothing */
21
22 #define newplb(x)       fprintf(codefile,"%s:\n",x)
23 #define newilb(x)       fprintf(codefile,"%s:\n",x)
24 #define newdlb(x)       fprintf(codefile,"%s:\n",x)
25 #ifdef ACK_ASS
26 #define newlbss(l,x)    fprintf(codefile,".comm %s,%u\n",l,x);
27 #else
28 #define newlbss(l,x)    fprintf(codefile,"%s:.=.+0%o\n",l,x);
29 #endif
30
31 #define cst_fmt         "$0%o"
32 #define off_fmt         "0%o"
33 #define ilb_fmt         "I%x_%x"
34 #define dlb_fmt         "_%d"
35 #define hol_fmt         "hol%d"
36
37 #define hol_off         "0%lo+hol%d"
38
39 #ifdef ACK_ASS
40 #define con_cst(x)      fprintf(codefile,".data2 0%lo\n",x)
41 #define con_ilb(x)      fprintf(codefile,".data2 %s\n",x)
42 #define con_dlb(x)      fprintf(codefile,".data2 %s\n",x)
43 #else
44 #define con_cst(x)      fprintf(codefile,"0%lo\n",x)
45 #define con_ilb(x)      fprintf(codefile,"%s\n",x)
46 #define con_dlb(x)      fprintf(codefile,"%s\n",x)
47 #endif
48
49 #ifdef ACK_ASS
50 #define modhead         ".sect .text; .sect .rom; .sect .data; .sect .bss\n"
51 #define fmt_id(f,t)     sprintf(t,"_%s",f)
52 #else
53 #define id_first        '_'
54 #endif
55
56 #define BSS_INIT        0