118 |
|
|
119 |
|
void version(void) |
120 |
|
{ |
121 |
< |
fprintf(monout, "mon V%d.%d\n", MON_VERSION_MAJOR, MON_VERSION_MINOR); |
121 |
> |
fprintf(monout, "mon V" VERSION "\n"); |
122 |
|
} |
123 |
|
|
124 |
|
|
260 |
|
} |
261 |
|
|
262 |
|
mon_dot_address = adr; |
263 |
+ |
} |
264 |
+ |
|
265 |
+ |
|
266 |
+ |
/* |
267 |
+ |
* Binary dump |
268 |
+ |
* b [start [end]] |
269 |
+ |
*/ |
270 |
+ |
|
271 |
+ |
void binary_dump(void) |
272 |
+ |
{ |
273 |
+ |
uint32 adr, end_adr; |
274 |
+ |
uint8 str[9]; |
275 |
+ |
|
276 |
+ |
str[8] = 0; |
277 |
+ |
|
278 |
+ |
if (!range_args(&adr, &end_adr, 7)) // 8 lines unless end address specified |
279 |
+ |
return; |
280 |
+ |
|
281 |
+ |
while (adr <= end_adr && !mon_aborted()) { |
282 |
+ |
fprintf(monout, "%08x:", mon_use_real_mem ? adr : adr % mon_mem_size); |
283 |
+ |
uint8 b = mon_read_byte(adr); |
284 |
+ |
for (int m=0x80, i=0; i<8; m>>=1, i++) |
285 |
+ |
str[i] = (b & m) ? '*' : '.'; |
286 |
+ |
fprintf(monout, " '%s'\n", str); |
287 |
+ |
adr++; |
288 |
+ |
} |
289 |
+ |
|
290 |
+ |
mon_dot_address = adr; |
291 |
|
} |
292 |
|
|
293 |
|
|