diff options
| author | uvok | 2026-01-21 20:20:39 +0100 |
|---|---|---|
| committer | uvok | 2026-01-21 20:20:39 +0100 |
| commit | e89a2aff9a91804a72866e4c458037d4d8e1f276 (patch) | |
| tree | 1abedd8be5b446301736fca6883991a1d00a048c /eater_cpu/cpp/Veater_computer__main.cpp | |
| parent | a7cb46cac7575875dd38e7d3135fd54d78598523 (diff) | |
eater: Use correct opcodes
I was off-by-one?
Diffstat (limited to 'eater_cpu/cpp/Veater_computer__main.cpp')
| -rw-r--r-- | eater_cpu/cpp/Veater_computer__main.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/eater_cpu/cpp/Veater_computer__main.cpp b/eater_cpu/cpp/Veater_computer__main.cpp index 7afa4d0..b986029 100644 --- a/eater_cpu/cpp/Veater_computer__main.cpp +++ b/eater_cpu/cpp/Veater_computer__main.cpp @@ -15,13 +15,15 @@ void load_program(const std::unique_ptr<Veater_computer> &topp) { // LDA 14 - topp->eater_computer->RAM->r_datastore[0] = 0x0e; + topp->eater_computer->RAM->r_datastore[0] = 0x1e; // ADD 15 - topp->eater_computer->RAM->r_datastore[1] = 0x1f; + topp->eater_computer->RAM->r_datastore[1] = 0x2f; // OUT topp->eater_computer->RAM->r_datastore[2] = 0xe0; + // NOP + topp->eater_computer->RAM->r_datastore[3] = 0x00; // HALT - topp->eater_computer->RAM->r_datastore[3] = 0xf0; + topp->eater_computer->RAM->r_datastore[4] = 0xf0; // Data @ 14 topp->eater_computer->RAM->r_datastore[14] = 14; // Data @ 15 |
