diff lwasm/main.c @ 367:c6d2a1f54e0c

Change processor target variations to pragmas. Add "pragma 6809" and "pragma 6309" which select the processor target rather than a global flag. The command line switches set or reset the pragma appropriately. Thanks to Erik G <erik@6809.org> for the patch.
author William Astle <lost@l-w.ca>
date Mon, 15 Jun 2015 21:21:58 -0600
parents 433dbc18fb41
children 8e25147c2aa8
line wrap: on
line diff
--- a/lwasm/main.c	Tue Jun 02 20:58:14 2015 -0600
+++ b/lwasm/main.c	Mon Jun 15 21:21:58 2015 -0600
@@ -202,11 +202,11 @@
 		break;
 
 	case '9':
-		as -> target = TARGET_6809;
+		as -> pragmas |= PRAGMA_6809;
 		break;
 
 	case '3':
-		as -> target = TARGET_6309;
+		as -> pragmas &= ~PRAGMA_6809;
 		break;
 
 	case 'P':
@@ -292,7 +292,6 @@
 	asmstate.include_list = lw_stringlist_create();
 	asmstate.input_files = lw_stringlist_create();
 	asmstate.nextcontext = 1;
-	asmstate.target = TARGET_6309;
 	asmstate.exprwidth = 16;
 	
 	/* parse command line arguments */