diff lwasm/insn_gen.c @ 222:7803d2d09993

Allow 8 bit immediate operands to be external references
author lost
date Sat, 09 May 2009 16:39:17 +0000
parents 2b254f02b252
children
line wrap: on
line diff
--- a/lwasm/insn_gen.c	Sat May 09 16:32:47 2009 +0000
+++ b/lwasm/insn_gen.c	Sat May 09 16:39:17 2009 +0000
@@ -159,7 +159,11 @@
 		if (r != 0)
 			rval = 0;
 		if (r == 1 && as -> passnum == 2)
-			register_error(as, l, 2, "Illegal external or intersegment reference");
+		{
+			l -> relocoff = as -> addr - l -> codeaddr;
+			l -> reloc8bit = 1;
+		}
+//			register_error(as, l, 2, "Illegal external or intersegment reference");
 		lwasm_emit(as, l, rval & 0xff);
 		return;
 	}