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.5 by cebix, 2000-04-24T13:10:17Z

# Line 118 | Line 118 | static inline uint8 char2print(uint8 c)
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  
# Line 260 | Line 260 | void ascii_dump(void)
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  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines