Commit 225162b593b8a1820c76e6b41063a691cba3fd53
1 parent
9ff101a8
Missed small mistake
Showing
1 changed file
with
23 additions
and
23 deletions
debug.c
@@ -157,73 +157,73 @@ void print_instruction(uint16_t opcode, uint16_t arg1, uint16_t arg2, uint16_t a | @@ -157,73 +157,73 @@ void print_instruction(uint16_t opcode, uint16_t arg1, uint16_t arg2, uint16_t a | ||
157 | switch(opcode) | 157 | switch(opcode) |
158 | { | 158 | { |
159 | case HALT: | 159 | case HALT: |
160 | - printf("HALT\n"); | 160 | + fprintf(stderr,"HALT\n"); |
161 | break; | 161 | break; |
162 | case MOV: | 162 | case MOV: |
163 | - printf("MOV %d %d\n",arg1,arg2); | 163 | + fprintf(stderr,"MOV %d %d\n",arg1,arg2); |
164 | break; | 164 | break; |
165 | case PUSH: | 165 | case PUSH: |
166 | - printf("PUSH %d\n",arg1); | 166 | + fprintf(stderr,"PUSH %d\n",arg1); |
167 | break; | 167 | break; |
168 | case POP: | 168 | case POP: |
169 | - printf("POP %d\n",arg1); | 169 | + fprintf(stderr,"POP %d\n",arg1); |
170 | break; | 170 | break; |
171 | case TEQ: | 171 | case TEQ: |
172 | - printf("TEQ %d %d %d\n",arg1,arg2,arg3); | 172 | + fprintf(stderr,"TEQ %d %d %d\n",arg1,arg2,arg3); |
173 | break; | 173 | break; |
174 | case TGT: | 174 | case TGT: |
175 | - printf("TGT %d %d %d\n",arg1,arg2,arg3); | 175 | + fprintf(stderr,"TGT %d %d %d\n",arg1,arg2,arg3); |
176 | break; | 176 | break; |
177 | case JMP: | 177 | case JMP: |
178 | - printf("JMP %d\n",arg1); | 178 | + fprintf(stderr,"JMP %d\n",arg1); |
179 | break; | 179 | break; |
180 | case JNZ: | 180 | case JNZ: |
181 | - printf("JNZ %d %d\n",arg1,arg2); | 181 | + fprintf(stderr,"JNZ %d %d\n",arg1,arg2); |
182 | break; | 182 | break; |
183 | case JZ: | 183 | case JZ: |
184 | - printf("JZ %d %d\n",arg1,arg2); | 184 | + fprintf(stderr,"JZ %d %d\n",arg1,arg2); |
185 | break; | 185 | break; |
186 | case ADD: | 186 | case ADD: |
187 | - printf("ADD %d %d %d\n",arg1,arg2,arg3); | 187 | + fprintf(stderr,"ADD %d %d %d\n",arg1,arg2,arg3); |
188 | break; | 188 | break; |
189 | case MUL: | 189 | case MUL: |
190 | - printf("MUL %d %d %d\n",arg1,arg2,arg3); | 190 | + fprintf(stderr,"MUL %d %d %d\n",arg1,arg2,arg3); |
191 | break; | 191 | break; |
192 | case MOD: | 192 | case MOD: |
193 | - printf("MOD %d %d %d\n",arg1,arg2,arg3); | 193 | + fprintf(stderr,"MOD %d %d %d\n",arg1,arg2,arg3); |
194 | break; | 194 | break; |
195 | case AND: | 195 | case AND: |
196 | - printf("AND %d %d %d\n",arg1,arg2,arg3); | 196 | + fprintf(stderr,"AND %d %d %d\n",arg1,arg2,arg3); |
197 | break; | 197 | break; |
198 | case OR: | 198 | case OR: |
199 | - printf("OR %d %d %d\n",arg1,arg2,arg3); | 199 | + fprintf(stderr,"OR %d %d %d\n",arg1,arg2,arg3); |
200 | break; | 200 | break; |
201 | case NOT: | 201 | case NOT: |
202 | - printf("NOT %d %d\n",arg1,arg2); | 202 | + fprintf(stderr,"NOT %d %d\n",arg1,arg2); |
203 | break; | 203 | break; |
204 | case LOAD: | 204 | case LOAD: |
205 | - printf("LOAD %d %d\n",arg1,arg2); | 205 | + fprintf(stderr,"LOAD %d %d\n",arg1,arg2); |
206 | break; | 206 | break; |
207 | case STOR: | 207 | case STOR: |
208 | - printf("STOR %d %d\n",arg1,arg2); | 208 | + fprintf(stderr,"STOR %d %d\n",arg1,arg2); |
209 | break; | 209 | break; |
210 | case CALL: | 210 | case CALL: |
211 | - printf("CALL %d\n",arg1); | 211 | + fprintf(stderr,"CALL %d\n",arg1); |
212 | break; | 212 | break; |
213 | case RET: | 213 | case RET: |
214 | - printf("RET\n"); | 214 | + fprintf(stderr,"RET\n"); |
215 | break; | 215 | break; |
216 | case OUT: | 216 | case OUT: |
217 | - printf("OUT %d\n",arg1); | 217 | + fprintf(stderr,"OUT %d\n",arg1); |
218 | break; | 218 | break; |
219 | case IN: | 219 | case IN: |
220 | - printf("IN %d\n",arg1); | 220 | + fprintf(stderr,"IN %d\n",arg1); |
221 | break; | 221 | break; |
222 | case NOP: | 222 | case NOP: |
223 | - printf("NOP\n"); | 223 | + fprintf(stderr,"NOP\n"); |
224 | break; | 224 | break; |
225 | default: | 225 | default: |
226 | - printf("UNK %d\n", opcode); | 226 | + fprintf(stderr,"UNK %d\n", opcode); |
227 | break; | 227 | break; |
228 | } | 228 | } |
229 | } | 229 | } |