comparison 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
comparison
equal deleted inserted replaced
389:fbb7bfed8076 390:027d7fbcdcfc
44 { 44 {
45 { "output", 'o', "FILE", 0, "Output to FILE"}, 45 { "output", 'o', "FILE", 0, "Output to FILE"},
46 { "debug", 'd', "LEVEL", OPTION_ARG_OPTIONAL, "Set debug mode"}, 46 { "debug", 'd', "LEVEL", OPTION_ARG_OPTIONAL, "Set debug mode"},
47 { "format", 'f', "TYPE", 0, "Select output format: decb, raw, obj, os9"}, 47 { "format", 'f', "TYPE", 0, "Select output format: decb, raw, obj, os9"},
48 { "list", 'l', "FILE", OPTION_ARG_OPTIONAL, "Generate list [to FILE]"}, 48 { "list", 'l', "FILE", OPTION_ARG_OPTIONAL, "Generate list [to FILE]"},
49 { "symbols", 's', 0, OPTION_ARG_OPTIONAL, "Generate symbol list in listing, no effect without --list"},
49 { "decb", 'b', 0, 0, "Generate DECB .bin format output, equivalent of --format=decb"}, 50 { "decb", 'b', 0, 0, "Generate DECB .bin format output, equivalent of --format=decb"},
50 { "raw", 'r', 0, 0, "Generate raw binary format output, equivalent of --format=raw"}, 51 { "raw", 'r', 0, 0, "Generate raw binary format output, equivalent of --format=raw"},
51 { "obj", 0x100, 0, 0, "Generate proprietary object file format for later linking, equivalent of --format=obj" }, 52 { "obj", 0x100, 0, 0, "Generate proprietary object file format for later linking, equivalent of --format=obj" },
52 { "depend", 0x101, 0, 0, "Output a dependency list to stdout; do not do any actual output though assembly is completed as usual" }, 53 { "depend", 0x101, 0, 0, "Output a dependency list to stdout; do not do any actual output though assembly is completed as usual" },
53 { "pragma", 'p', "PRAGMA", 0, "Set an assembler pragma to any value understood by the \"pragma\" pseudo op"}, 54 { "pragma", 'p', "PRAGMA", 0, "Set an assembler pragma to any value understood by the \"pragma\" pseudo op"},
87 if (!arg) 88 if (!arg)
88 as -> list_file = NULL; 89 as -> list_file = NULL;
89 else 90 else
90 as -> list_file = lw_strdup(arg); 91 as -> list_file = lw_strdup(arg);
91 as -> flags |= FLAG_LIST; 92 as -> flags |= FLAG_LIST;
93 break;
94
95 case 's':
96 as -> flags |= FLAG_SYMBOLS;
92 break; 97 break;
93 98
94 case 'b': 99 case 'b':
95 as -> output_format = OUTPUT_DECB; 100 as -> output_format = OUTPUT_DECB;
96 break; 101 break;