changeset 191:29ba546ceea0

Added ~ prefix operator (1s complement)
author lost
date Sun, 22 Mar 2009 16:12:06 +0000
parents 563adfccb645
children bfd0fb0a85c2
files ChangeLog lwasm/expr.c
diffstat 2 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sun Mar 22 16:08:20 2009 +0000
+++ b/ChangeLog	Sun Mar 22 16:12:06 2009 +0000
@@ -22,6 +22,7 @@
 [+] added ability to "replace" members in LWAR
 [+] added support for "sym=expr" in the opcode field; this will define a
     global symbol (non-section) if it resolves to a constant
+[+] added operator ~ as a prefix operator for a 1s complement in LWASM
 [b] arranged for output files for lwasm/lwlink to be removed if the assembly
     or linking fails
 [ ] DECB output of LWLINK now collapses contiguous output blocks into single
--- a/lwasm/expr.c	Sun Mar 22 16:08:20 2009 +0000
+++ b/lwasm/expr.c	Sun Mar 22 16:12:06 2009 +0000
@@ -230,7 +230,7 @@
 		return 0;
 	}
 	
-	if (**p == '^')
+	if (**p == '^' || **p == '~')
 	{
 		// parse expression following "^"
 		(*p)++;