comparison lwasm/main.c @ 332:67224d8d1024

Basic input layer works
author lost
date Tue, 02 Mar 2010 00:10:32 +0000
parents 81c005b82775
children 9f58e3bca6e3
comparison
equal deleted inserted replaced
331:ed3553296580 332:67224d8d1024
161 161
162 /* 162 /*
163 main function; parse command line, set up assembler state, and run the 163 main function; parse command line, set up assembler state, and run the
164 assembler on the first file 164 assembler on the first file
165 */ 165 */
166 extern void do_pass1(asmstate_t *as);
167
166 int main(int argc, char **argv) 168 int main(int argc, char **argv)
167 { 169 {
168 /* assembler state */ 170 /* assembler state */
169 asmstate_t asmstate = { 0 }; 171 asmstate_t asmstate = { 0 };
170 program_name = argv[0]; 172 program_name = argv[0];
181 asmstate.output_file = lw_strdup("a.out"); 183 asmstate.output_file = lw_strdup("a.out");
182 } 184 }
183 185
184 input_init(&asmstate); 186 input_init(&asmstate);
185 187
188 do_pass1(&asmstate);
189
186 exit(0); 190 exit(0);
187 } 191 }