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 | 157 | switch(opcode) |
158 | 158 | { |
159 | 159 | case HALT: |
160 | - printf("HALT\n"); | |
160 | + fprintf(stderr,"HALT\n"); | |
161 | 161 | break; |
162 | 162 | case MOV: |
163 | - printf("MOV %d %d\n",arg1,arg2); | |
163 | + fprintf(stderr,"MOV %d %d\n",arg1,arg2); | |
164 | 164 | break; |
165 | 165 | case PUSH: |
166 | - printf("PUSH %d\n",arg1); | |
166 | + fprintf(stderr,"PUSH %d\n",arg1); | |
167 | 167 | break; |
168 | 168 | case POP: |
169 | - printf("POP %d\n",arg1); | |
169 | + fprintf(stderr,"POP %d\n",arg1); | |
170 | 170 | break; |
171 | 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 | 173 | break; |
174 | 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 | 176 | break; |
177 | 177 | case JMP: |
178 | - printf("JMP %d\n",arg1); | |
178 | + fprintf(stderr,"JMP %d\n",arg1); | |
179 | 179 | break; |
180 | 180 | case JNZ: |
181 | - printf("JNZ %d %d\n",arg1,arg2); | |
181 | + fprintf(stderr,"JNZ %d %d\n",arg1,arg2); | |
182 | 182 | break; |
183 | 183 | case JZ: |
184 | - printf("JZ %d %d\n",arg1,arg2); | |
184 | + fprintf(stderr,"JZ %d %d\n",arg1,arg2); | |
185 | 185 | break; |
186 | 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 | 188 | break; |
189 | 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 | 191 | break; |
192 | 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 | 194 | break; |
195 | 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 | 197 | break; |
198 | 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 | 200 | break; |
201 | 201 | case NOT: |
202 | - printf("NOT %d %d\n",arg1,arg2); | |
202 | + fprintf(stderr,"NOT %d %d\n",arg1,arg2); | |
203 | 203 | break; |
204 | 204 | case LOAD: |
205 | - printf("LOAD %d %d\n",arg1,arg2); | |
205 | + fprintf(stderr,"LOAD %d %d\n",arg1,arg2); | |
206 | 206 | break; |
207 | 207 | case STOR: |
208 | - printf("STOR %d %d\n",arg1,arg2); | |
208 | + fprintf(stderr,"STOR %d %d\n",arg1,arg2); | |
209 | 209 | break; |
210 | 210 | case CALL: |
211 | - printf("CALL %d\n",arg1); | |
211 | + fprintf(stderr,"CALL %d\n",arg1); | |
212 | 212 | break; |
213 | 213 | case RET: |
214 | - printf("RET\n"); | |
214 | + fprintf(stderr,"RET\n"); | |
215 | 215 | break; |
216 | 216 | case OUT: |
217 | - printf("OUT %d\n",arg1); | |
217 | + fprintf(stderr,"OUT %d\n",arg1); | |
218 | 218 | break; |
219 | 219 | case IN: |
220 | - printf("IN %d\n",arg1); | |
220 | + fprintf(stderr,"IN %d\n",arg1); | |
221 | 221 | break; |
222 | 222 | case NOP: |
223 | - printf("NOP\n"); | |
223 | + fprintf(stderr,"NOP\n"); | |
224 | 224 | break; |
225 | 225 | default: |
226 | - printf("UNK %d\n", opcode); | |
226 | + fprintf(stderr,"UNK %d\n", opcode); | |
227 | 227 | break; |
228 | 228 | } |
229 | 229 | } | ... | ... |