From 5544ad5c06bee5f562dddd055c571818bc0d0119 Mon Sep 17 00:00:00 2001
From: David Phillips <david@sighup.nz>
Date: Mon, 29 Jul 2019 22:07:00 +1200
Subject: Add test for asm-disasm-asm, fix bug with labels

This adds a support script for future expansion of an asm->disasm->asm
series of tests, which will at minimum ensure some parity between the
assembler and disassembler. Lower level tests to ensure correct behaviour
rather than just symmetrical behaviour belong in another set of tests.

This patch also fixes the assembler's behaviour around numeric labels.
Many other assemblers support entirely numeric labels, and the output
of the disassembler includes them. The assembler has been adjusted to
lex a probably-numeric as a label if it is at the start of the line.
Otherwise, old label behavour and old numeric behaviour is left in
place.
---
 output.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'output.c')

diff --git a/output.c b/output.c
index 2afb5fe..047040a 100644
--- a/output.c
+++ b/output.c
@@ -165,7 +165,7 @@ int output_single(FILE *f, struct label *labels, size_t labels_count, struct ins
 	}
 
 	if (len == 2) {
-//#define RAW
+#define RAW
 #ifdef RAW
 		fputc(0xFF & (i >> 24), f);
 		fputc(0xFF & (i >> 16), f);
-- 
cgit v1.1