Mercurial > hg > index.cgi
comparison lwasm/pseudo.c @ 432:58cafa61ab40
Add support for undocumented custom module format (for LW)
Nothing to see here. Move along. These are not the droids you are looking
for.
author | William Astle <lost@l-w.ca> |
---|---|
date | Fri, 18 Nov 2016 21:25:43 -0700 |
parents | 4411a6123716 |
children | 999ae00d0919 |
comparison
equal
deleted
inserted
replaced
431:6df8d62302e2 | 432:58cafa61ab40 |
---|---|
100 if (CURPRAGMA(l, PRAGMA_M80EXT) && input_isinclude(as)) | 100 if (CURPRAGMA(l, PRAGMA_M80EXT) && input_isinclude(as)) |
101 return; /* ignore END inside includes */ | 101 return; /* ignore END inside includes */ |
102 | 102 |
103 as->endseen = 1; | 103 as->endseen = 1; |
104 | 104 |
105 if ((as -> output_format != OUTPUT_DECB) && (as -> output_format != OUTPUT_BASIC)) | 105 if ((as -> output_format != OUTPUT_DECB) && (as -> output_format != OUTPUT_BASIC) && (as -> output_format != OUTPUT_LWMOD)) |
106 { | 106 { |
107 skip_operand(p); | 107 skip_operand(p); |
108 return; | 108 return; |
109 } | 109 } |
110 | 110 |
134 addr = lwasm_fetch_expr(l, 0); | 134 addr = lwasm_fetch_expr(l, 0); |
135 | 135 |
136 if (addr) | 136 if (addr) |
137 { | 137 { |
138 if (!lw_expr_istype(addr, lw_expr_type_int)) | 138 if (!lw_expr_istype(addr, lw_expr_type_int)) |
139 lwasm_register_error(as, l, E_EXEC_ADDRESS); | 139 { |
140 if (as -> output_format == OUTPUT_LWMOD) | |
141 { | |
142 as -> execaddr_expr = lw_expr_copy(addr); | |
143 } | |
144 else | |
145 { | |
146 lwasm_register_error(as, l, E_EXEC_ADDRESS); | |
147 } | |
148 } | |
140 else | 149 else |
150 { | |
151 as -> execaddr_expr = NULL; | |
141 as -> execaddr = lw_expr_intval(addr); | 152 as -> execaddr = lw_expr_intval(addr); |
153 } | |
142 } | 154 } |
143 as -> endseen = 1; | 155 as -> endseen = 1; |
144 } | 156 } |
145 | 157 |
146 PARSEFUNC(pseudo_parse_fcb) | 158 PARSEFUNC(pseudo_parse_fcb) |