diff lwasm/main.c @ 390:027d7fbcdcfc

Basic symbol table output; needs work for non-constant symbols
author lost@l-w.ca
date Wed, 14 Jul 2010 22:46:56 -0600
parents a741d2e4869f
children
line wrap: on
line diff
--- a/lwasm/main.c	Wed Jul 14 22:33:55 2010 -0600
+++ b/lwasm/main.c	Wed Jul 14 22:46:56 2010 -0600
@@ -46,6 +46,7 @@
 	{ "debug",		'd',	"LEVEL",	OPTION_ARG_OPTIONAL,	"Set debug mode"},
 	{ "format",		'f',	"TYPE",		0,						"Select output format: decb, raw, obj, os9"},
 	{ "list",		'l',	"FILE",		OPTION_ARG_OPTIONAL,	"Generate list [to FILE]"},
+	{ "symbols",	's',	0,			OPTION_ARG_OPTIONAL,	"Generate symbol list in listing, no effect without --list"},
 	{ "decb",		'b',	0,			0,						"Generate DECB .bin format output, equivalent of --format=decb"},
 	{ "raw",		'r',	0,			0,						"Generate raw binary format output, equivalent of --format=raw"},
 	{ "obj",		0x100,	0,			0,						"Generate proprietary object file format for later linking, equivalent of --format=obj" },
@@ -90,6 +91,10 @@
 			as -> list_file = lw_strdup(arg);
 		as -> flags |= FLAG_LIST;
 		break;
+
+	case 's':
+		as -> flags |= FLAG_SYMBOLS;
+		break;
 		
 	case 'b':
 		as -> output_format = OUTPUT_DECB;