diff 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
line wrap: on
line diff
--- a/lwasm/lwasm.c	Thu Nov 01 23:00:00 2018 -0600
+++ b/lwasm/lwasm.c	Thu Nov 01 23:07:03 2018 -0600
@@ -436,6 +436,8 @@
 
 void lwasm_emit(line_t *cl, int byte)
 {
+	if (CURPRAGMA(cl, PRAGMA_NOOUTPUT))
+		return;
 	if (cl -> as -> output_format == OUTPUT_OBJ && cl -> csect == NULL)
 	{
 		lwasm_register_error(cl -> as, cl, E_INSTRUCTION_SECTION);