changeset 196:e7309c716059

Allow relative addressing to ignore a # before the operand (16 bit too!)
author lost
date Sun, 22 Mar 2009 17:58:43 +0000
parents 383caf808674
children 12fb4e8d5236
files lwasm/insn_rel.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lwasm/insn_rel.c	Sun Mar 22 17:57:39 2009 +0000
+++ b/lwasm/insn_rel.c	Sun Mar 22 17:58:43 2009 +0000
@@ -84,6 +84,9 @@
 	
 	lwasm_emitop(as, l, instab[opnum].ops[0]);
 	
+	if (**p == '#')
+		(*p)++;
+
 	r = lwasm_expr_result2(as, l, p, EXPR_SECTCONST, &v, 0);
 	if (r < 0)
 		v = 0;