-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathopcpp.c
More file actions
68 lines (57 loc) · 2.98 KB
/
opcpp.c
File metadata and controls
68 lines (57 loc) · 2.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*
opcpp.c - Part of macxx, a cross assembler family for various micro-processors
Copyright (C) 2008 David Shepperd
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "token.h"
#include "lstcnsts.h"
#include "pst_tokens.h"
/* The following are variables specific to the particular assembler */
const int macxx_name_mask = MACXX_M_PP;
const char macxx_name[] = "macpp";
const char *macxx_target = "unknown";
const char *macxx_descrip = "Macro pre-processor.";
uint16_t macxx_rel_salign = 0; /* default alignment for .REL. segment */
uint16_t macxx_rel_dalign = 0; /* default alignment for data in .REL. segment */
uint16_t macxx_abs_salign = 0; /* default alignments for .ABS. segment */
uint16_t macxx_abs_dalign = 0;
char macxx_mau = 8; /* number of bits/minimum addressable unit */
char macxx_bytes_mau = 1; /* number of bytes/mau */
char macxx_mau_byte = 1; /* number of mau's in a byte */
char macxx_mau_word = 2; /* number of mau's in a word */
char macxx_mau_long = 4; /* number of mau's in a long */
char macxx_nibbles_byte = 2; /* For the listing output routines */
char macxx_nibbles_word = 4;
char macxx_nibbles_long = 8;
uint32_t macxx_edm_default = 0; /* default edmask */
/* default list mask */
uint32_t macxx_lm_default = ~(LIST_ME|LIST_MEB|LIST_MES|LIST_LD|LIST_OCT);
int current_radix = 16; /* default the radix to hex */
char expr_open = '('; /* char that opens an expression */
char expr_close = ')'; /* char that closes an expression */
/* char expr_escape = '^'; */ /* char that escapes a unary expression term */
char macro_arg_open = '<'; /* char that opens a macro argument */
char macro_arg_close = '>'; /* char that closes a macro argument */
char macro_arg_escape = '^'; /* char that escapes a macro argument */
char macro_arg_gensym = '?'; /* char indicating generated symbol for macro */
char macro_arg_genval = '\\'; /* char indicating generated value for macro */
char open_operand = '('; /* char that opens an operand indirection */
char close_operand = ')'; /* char that closes an operand indirection */
int max_opcode_length = 32; /* significant length of opcodes and macros */
int max_symbol_length = 32; /* significant length of symbols */
/* End of processor specific stuff */
int ust_init()
{
return 0; /* would fill a user symbol table */
}
#define MAC_PP
#include "opcommon.h"