|
|
@ -69,19 +69,21 @@ namespace hv {
|
|
|
|
#define S
|
|
|
|
#define S
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
fmt::print("0x{:016x} ", offset);
|
|
|
|
fmt::print("0x{:016x} ", offset);
|
|
|
|
|
|
|
|
char hxbuf[3];
|
|
|
|
|
|
|
|
std::size_t i=0;
|
|
|
|
char ascii[1 + ROW_SZ];
|
|
|
|
char ascii[1 + ROW_SZ];
|
|
|
|
|
|
|
|
|
|
|
|
ascii[ROW_SZ] = 0;
|
|
|
|
ascii[ROW_SZ] = 0;
|
|
|
|
std::size_t i=0;
|
|
|
|
|
|
|
|
char hxbuf[3];
|
|
|
|
|
|
|
|
hxbuf[2] = 0;
|
|
|
|
hxbuf[2] = 0;
|
|
|
|
for(;i<memory.size();i++) {
|
|
|
|
for(;i<memory.size();i++) {
|
|
|
|
if (i && i % ROW_SZ == 0) {
|
|
|
|
if (i && i % ROW_SZ == 0) {
|
|
|
|
prints(" ", S ascii);
|
|
|
|
prints(" ", S ascii);
|
|
|
|
fmt::print("\n0x{:016x} ", i+offset);
|
|
|
|
fmt::print("\n0x{:016x} ", i+offset);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
hex02(memory[i], hxbuf);
|
|
|
|
unsigned char idx = memory[i];
|
|
|
|
|
|
|
|
hex02(idx, hxbuf);
|
|
|
|
prints(hxbuf, " ");
|
|
|
|
prints(hxbuf, " ");
|
|
|
|
ascii[i%ROW_SZ] = ascii_map[memory[i]];
|
|
|
|
ascii[i%ROW_SZ] = ascii_map[idx];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (memory.size() % ROW_SZ != 0)
|
|
|
|
if (memory.size() % ROW_SZ != 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|