Mercurial > hg > index.cgi
comparison lwasm/lwasm.c @ 473:8181ddd707f1
Add "nooutput" pragma
Add the "nooutput" pragma which causes assembly to proceed as normal for
code with the exception that no output is generated for any instructions
under this pragma. The current address is increased as usual and the symbol
table is still constructed. However, no actual output is generated for lines
operating under this pragma.
author | William Astle <lost@l-w.ca> |
---|---|
date | Thu, 01 Nov 2018 23:07:03 -0600 |
parents | 2c1c5dd84024 |
children | 87f904e2b304 |
comparison
equal
deleted
inserted
replaced
472:e97f9a302c6a | 473:8181ddd707f1 |
---|---|
434 return r; | 434 return r; |
435 } | 435 } |
436 | 436 |
437 void lwasm_emit(line_t *cl, int byte) | 437 void lwasm_emit(line_t *cl, int byte) |
438 { | 438 { |
439 if (CURPRAGMA(cl, PRAGMA_NOOUTPUT)) | |
440 return; | |
439 if (cl -> as -> output_format == OUTPUT_OBJ && cl -> csect == NULL) | 441 if (cl -> as -> output_format == OUTPUT_OBJ && cl -> csect == NULL) |
440 { | 442 { |
441 lwasm_register_error(cl -> as, cl, E_INSTRUCTION_SECTION); | 443 lwasm_register_error(cl -> as, cl, E_INSTRUCTION_SECTION); |
442 return; | 444 return; |
443 } | 445 } |