170 |
|
} |
171 |
|
|
172 |
|
if (val > 0x7fffffff) { |
173 |
< |
fprintf(monout, "Hex unsigned: $%08lx\n" |
174 |
< |
"Hex signed : -$%08lx\n" |
175 |
< |
"Dec unsigned: %lu\n" |
176 |
< |
"Dec signed : %ld\n", val, -val, val, val); |
173 |
> |
fprintf(monout, "Hex unsigned: $%08x\n" |
174 |
> |
"Hex signed : -$%08x\n" |
175 |
> |
"Dec unsigned: %u\n" |
176 |
> |
"Dec signed : %d\n", val, -val, val, val); |
177 |
|
fprintf(monout, "Char : '%c%c%c%c'\n", char2print(val >> 24), char2print(val >> 16), char2print(val >> 8), char2print(val)); |
178 |
|
} else { |
179 |
< |
fprintf(monout, "Hex : $%08lx\n" |
180 |
< |
"Dec : %ld\n", val, val); |
179 |
> |
fprintf(monout, "Hex : $%08x\n" |
180 |
> |
"Dec : %d\n", val, val); |
181 |
|
fprintf(monout, "Char: '%c%c%c%c'\n", char2print(val >> 24), char2print(val >> 16), char2print(val >> 8), char2print(val)); |
182 |
|
} |
183 |
|
} |
221 |
|
return; |
222 |
|
|
223 |
|
while (adr <= end_adr && !mon_aborted()) { |
224 |
< |
fprintf(monout, "%08lx:", mon_use_real_mem ? adr: adr % mon_mem_size); |
224 |
> |
fprintf(monout, "%08x:", mon_use_real_mem ? adr: adr % mon_mem_size); |
225 |
|
for (int i=0; i<MEMDUMP_BPL; i++, adr++) { |
226 |
|
if (i % 4 == 0) |
227 |
< |
fprintf(monout, " %08lx", mon_read_word(adr)); |
227 |
> |
fprintf(monout, " %08x", mon_read_word(adr)); |
228 |
|
mem[i] = char2print(mon_read_byte(adr)); |
229 |
|
} |
230 |
|
fprintf(monout, " '%s'\n", mem); |
252 |
|
return; |
253 |
|
|
254 |
|
while (adr <= end_adr && !mon_aborted()) { |
255 |
< |
fprintf(monout, "%08lx:", mon_use_real_mem ? adr : adr % mon_mem_size); |
255 |
> |
fprintf(monout, "%08x:", mon_use_real_mem ? adr : adr % mon_mem_size); |
256 |
|
for (int i=0; i<ASCIIDUMP_BPL; i++, adr++) |
257 |
|
str[i] = char2print(mon_read_byte(adr)); |
258 |
|
fprintf(monout, " '%s'\n", str); |
290 |
|
case CPU_PPC: |
291 |
|
while (adr <= end_adr && !mon_aborted()) { |
292 |
|
uint32 w = mon_read_word(adr); |
293 |
< |
fprintf(monout, "%08lx: %08lx\t", mon_use_real_mem ? adr : adr % mon_mem_size, w); |
293 |
> |
fprintf(monout, "%08x: %08x\t", mon_use_real_mem ? adr : adr % mon_mem_size, w); |
294 |
|
disass_ppc(monout, mon_use_real_mem ? adr : adr % mon_mem_size, w); |
295 |
|
adr += 4; |
296 |
|
} |
301 |
|
uint8 op = mon_read_byte(adr); |
302 |
|
uint8 lo = mon_read_byte(adr + 1); |
303 |
|
uint8 hi = mon_read_byte(adr + 2); |
304 |
< |
fprintf(monout, "%08lx: ", mon_use_real_mem ? adr : adr % mon_mem_size); |
304 |
> |
fprintf(monout, "%08x: ", mon_use_real_mem ? adr : adr % mon_mem_size); |
305 |
|
adr += disass_6502(monout, mon_use_real_mem ? adr : adr % mon_mem_size, op, lo, hi); |
306 |
|
} |
307 |
|
break; |
317 |
|
buf[5] = mon_read_half(adr + 10); |
318 |
|
buf[6] = mon_read_half(adr + 12); |
319 |
|
buf[7] = mon_read_half(adr + 14); |
320 |
< |
fprintf(monout, "%08lx: ", mon_use_real_mem ? adr : adr % mon_mem_size); |
320 |
> |
fprintf(monout, "%08x: ", mon_use_real_mem ? adr : adr % mon_mem_size); |
321 |
|
adr += disass_68k(monout, mon_use_real_mem ? adr : adr % mon_mem_size, buf); |
322 |
|
} |
323 |
|
break; |
327 |
|
uint8 op = mon_read_byte(adr); |
328 |
|
uint8 lo = mon_read_byte(adr + 1); |
329 |
|
uint8 hi = mon_read_byte(adr + 2); |
330 |
< |
fprintf(monout, "%08lx: ", mon_use_real_mem ? adr : adr % mon_mem_size); |
330 |
> |
fprintf(monout, "%08x: ", mon_use_real_mem ? adr : adr % mon_mem_size); |
331 |
|
adr += disass_8080(monout, mon_use_real_mem ? adr : adr % mon_mem_size, op, lo, hi); |
332 |
|
} |
333 |
|
break; |
337 |
|
uint8 buf[16]; |
338 |
|
for (int i=0; i<16; i++) |
339 |
|
buf[i] = mon_read_byte(adr + i); |
340 |
< |
fprintf(monout, "%08lx: ", mon_use_real_mem ? adr : adr % mon_mem_size); |
340 |
> |
fprintf(monout, "%08x: ", mon_use_real_mem ? adr : adr % mon_mem_size); |
341 |
|
adr += disass_x86(monout, mon_use_real_mem ? adr : adr % mon_mem_size, buf); |
342 |
|
} |
343 |
|
break; |
473 |
|
|
474 |
|
while (adr <= end_adr && !mon_aborted()) { |
475 |
|
if (mon_read_byte(adr) != mon_read_byte(dest)) { |
476 |
< |
fprintf(monout, "%08lx ", mon_use_real_mem ? adr : adr % mon_mem_size); |
476 |
> |
fprintf(monout, "%08x ", mon_use_real_mem ? adr : adr % mon_mem_size); |
477 |
|
num++; |
478 |
|
if (!(num & 7)) |
479 |
|
fputc('\n', monout); |
513 |
|
break; |
514 |
|
|
515 |
|
if (i == len) { |
516 |
< |
fprintf(monout, "%08lx ", mon_use_real_mem ? adr : adr % mon_mem_size); |
516 |
> |
fprintf(monout, "%08x ", mon_use_real_mem ? adr : adr % mon_mem_size); |
517 |
|
num++; |
518 |
|
if (num == 1) |
519 |
|
mon_dot_address = adr; |
565 |
|
mon_write_byte(adr++, fc); |
566 |
|
fclose(file); |
567 |
|
|
568 |
< |
fprintf(monerr, "%08lx bytes read from %08lx to %08lx\n", adr - start_adr, mon_use_real_mem ? start_adr : start_adr % mon_mem_size, mon_use_real_mem ? adr-1 : (adr-1) % mon_mem_size); |
568 |
> |
fprintf(monerr, "%08x bytes read from %08x to %08x\n", adr - start_adr, mon_use_real_mem ? start_adr : start_adr % mon_mem_size, mon_use_real_mem ? adr-1 : (adr-1) % mon_mem_size); |
569 |
|
mon_dot_address = adr; |
570 |
|
} |
571 |
|
} |
608 |
|
fputc(mon_read_byte(adr++), file); |
609 |
|
fclose(file); |
610 |
|
|
611 |
< |
fprintf(monerr, "%08lx bytes written from %08lx to %08lx\n", size, mon_use_real_mem ? start_adr : start_adr % mon_mem_size, mon_use_real_mem ? end_adr : end_adr % mon_mem_size); |
611 |
> |
fprintf(monerr, "%08x bytes written from %08x to %08x\n", size, mon_use_real_mem ? start_adr : start_adr % mon_mem_size, mon_use_real_mem ? end_adr : end_adr % mon_mem_size); |
612 |
|
} |
613 |
|
} |