ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/mon/src/mon_cmd.cpp
(Generate patch)

Comparing mon/src/mon_cmd.cpp (file contents):
Revision 1.4 by cebix, 1999-10-25T08:04:47Z vs.
Revision 1.6 by hellwig, 2000-06-10T19:07:37Z

# Line 30 | Line 30
30   #include "mon_6502.h"
31   #include "mon_8080.h"
32  
33 + #ifndef VERSION
34 + #define VERSION "2"
35 + #endif
36 +
37  
38   /*
39   *  range_args = [expression] [[COMMA] expression] END
# Line 118 | Line 122 | static inline uint8 char2print(uint8 c)
122  
123   void version(void)
124   {
125 <        fprintf(monout, "mon V%d.%d\n", MON_VERSION_MAJOR, MON_VERSION_MINOR);
125 >        fprintf(monout, "mon V" VERSION "\n");
126   }
127  
128  
# Line 260 | Line 264 | void ascii_dump(void)
264          }
265  
266          mon_dot_address = adr;
267 + }
268 +
269 +
270 + /*
271 + *  Binary dump
272 + *  b [start [end]]
273 + */
274 +
275 + void binary_dump(void)
276 + {
277 +        uint32 adr, end_adr;
278 +        uint8 str[9];
279 +
280 +        str[8] = 0;
281 +
282 +        if (!range_args(&adr, &end_adr, 7))  // 8 lines unless end address specified
283 +                return;
284 +
285 +        while (adr <= end_adr && !mon_aborted()) {
286 +                fprintf(monout, "%08x:", mon_use_real_mem ? adr : adr % mon_mem_size);
287 +                uint8 b = mon_read_byte(adr);
288 +                for (int m=0x80, i=0; i<8; m>>=1, i++)
289 +                        str[i] = (b & m) ? '*' : '.';
290 +                fprintf(monout, " '%s'\n", str);
291 +                adr++;
292 +        }
293 +
294 +        mon_dot_address = adr;
295   }
296  
297  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines