56 if ((addr & customH->mask) != customH->addr)
58 return customH->origSys->dwrite(customH->origSys->handle, cpu, addr, buf, len);
68 std::cout << (char)buf[0];
74 std::cout <<
" <char> ";
75 for (
unsigned i = 0; i < len; i++)
77 iout |= buf[i] << (len - i - 1) * 8;
78 fbuf |= buf[i] << (len - i - 1) * 8;
79 bool isChar = (buf[i] > 32 && buf[i] < 127);
83 std::cout << (isChar ? std::string(
"\033[1;31m") : std::string(
"")) << std::setw(2) << (char)buf[i]
84 << (isChar ? std::string(
"\033[0m") : std::string(
""));
86 float *fout =
reinterpret_cast<float *
>(&fbuf);
88 std::cout << std::setfill(
'0') << std::hex <<
" | <hex> 0x" << std::setw(8) << iout << std::dec
90 std::cout <<
" | <int> " << std::setw(10) << iout;
91 std::cout <<
" | <float> " << *fout;
92 std::cout << std::endl;
95 std::flush(std::cout);