#include #include #include #include #include "isa/checker.h" extern std::uint16_t _binary_build___image_bin_start[]; extern std::uint16_t _binary_build___image_bin_end[]; int main(int argc, const char *argv[]) { checker checker; unsigned int address = 0; for (auto *src = _binary_build___image_bin_start; src < _binary_build___image_bin_end; ++src, ++address) { auto word = ntohs(*src); std::cout << fmt::format("mem[{:04o}] = {:04o}\n", address, word); checker.mem.store(address, word); } while (!checker.halted) { std::cout << fmt::format("{:04o}: ", checker.pc); checker.execute(); std::cout << fmt::format("acc={:04o}\n", checker.acc); } return 0; }