diff options
| author | uvok | 2026-01-25 16:41:54 +0100 |
|---|---|---|
| committer | uvok | 2026-01-25 16:41:54 +0100 |
| commit | b0d57098b6c1f178841e33a8f02f60349464491c (patch) | |
| tree | 57af3fefbebe2e5dda734389dad68f7ba5e4609b /eater_cpu | |
| parent | 090b432b90577e968557d32f84c4f2ed7fe97f57 (diff) | |
eater: "test" flags
Diffstat (limited to 'eater_cpu')
| -rw-r--r-- | eater_cpu/cpp/Veater_computer__main.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/eater_cpu/cpp/Veater_computer__main.cpp b/eater_cpu/cpp/Veater_computer__main.cpp index e7dc553..d73e542 100644 --- a/eater_cpu/cpp/Veater_computer__main.cpp +++ b/eater_cpu/cpp/Veater_computer__main.cpp @@ -26,10 +26,10 @@ void load_program(const std::unique_ptr<Veater_computer> &topp) { 0x4c, // SUB 13 0x3d, - // STA 11 - 0x4b, // OUT_op 0xe0, + // ADD 11 + 0x2b, // LDI 4 0x54, // NOP @@ -40,6 +40,8 @@ void load_program(const std::unique_ptr<Veater_computer> &topp) { 0xf0}; std::copy(instructions.begin(), instructions.end(), &topp->eater_computer->RAM->r_datastore[0]); + // Data @ 11 - provoke overflow + topp->eater_computer->RAM->r_datastore[11] = 0xfe; // Data @ 13 topp->eater_computer->RAM->r_datastore[13] = 1; // Data @ 14 |
