comparison src/pass1.c @ 44:2330b88f9600

Added simple output listing
author lost
date Sun, 04 Jan 2009 06:52:18 +0000
parents 4bb7b723e5b7
children b962cee20bf4
comparison
equal deleted inserted replaced
43:b33eca135258 44:2330b88f9600
139 nl -> bytes = NULL; 139 nl -> bytes = NULL;
140 nl -> codelen = 0; 140 nl -> codelen = 0;
141 nl -> codesize = 0; 141 nl -> codesize = 0;
142 if (as -> linestail) 142 if (as -> linestail)
143 as -> linestail -> next = nl; 143 as -> linestail -> next = nl;
144 else 144 as -> linestail = nl;
145 as -> linestail = nl;
146 if (!(as -> lineshead)) 145 if (!(as -> lineshead))
147 as -> lineshead = nl; 146 as -> lineshead = nl;
148 lwasm_parse_line(as, nl); 147 lwasm_parse_line(as, nl);
149 } 148 }
150 if (c == EOF) 149 if (c == EOF)
158 void lwasm_pass1(asmstate_t *as) 157 void lwasm_pass1(asmstate_t *as)
159 { 158 {
160 as -> passnum = 1; 159 as -> passnum = 1;
161 as -> addr = 0; 160 as -> addr = 0;
162 161
162 debug_message(1, "Entering pass 1");
163 if (lwasm_read_file(as, as -> infile) < 0) 163 if (lwasm_read_file(as, as -> infile) < 0)
164 { 164 {
165 fprintf(stderr, "Error reading input file '%s'", as -> infile); 165 fprintf(stderr, "Error reading input file '%s'", as -> infile);
166 perror(""); 166 perror("");
167 exit(1); 167 exit(1);