diff src/parse.c @ 38:9bd584bb6296

Added debugging message infrastructure
author lost
date Sat, 03 Jan 2009 04:53:49 +0000
parents 538e15927776
children 2330b88f9600
line wrap: on
line diff
--- a/src/parse.c	Sat Jan 03 04:20:49 2009 +0000
+++ b/src/parse.c	Sat Jan 03 04:53:49 2009 +0000
@@ -62,13 +62,14 @@
 		l -> sym = sym;
 		// have a symbol; now determine if it is valid and register it
 		// at the current address of the line
+		debug_message(1, "Registering symbol '%s' at %04X", sym, as -> addr);
 		if (lwasm_register_symbol(as, l, sym, as -> addr) < 0)
 			l -> sym = NULL;
 	}
 	else
 	{
 		while (*p && isspace(*p))
-			(*p)++;
+			p++;
 		if (!*p)
 		{
 			as -> context += 1;
@@ -95,6 +96,8 @@
 	memcpy(opc, p, p2 - p);
 	opc[p2 - p] = '\0';
 
+	debug_message(2, "Found operation code: '%s'", opc);
+
 	// skip intervening whitespace if present
 	while (*p2 && isspace(*p2))
 		p2++;