summaryrefslogtreecommitdiff
path: root/eater_cpu/cpp/Veater_computer__main.cpp
diff options
context:
space:
mode:
authoruvok2026-01-22 19:53:08 +0100
committeruvok2026-01-22 19:53:08 +0100
commitbe20c4149da8af929bbdc26f32c17bfcd0981cd9 (patch)
tree890e7a5796a8fe1c122343e208aa1cff45c110fb /eater_cpu/cpp/Veater_computer__main.cpp
parent63ca6b95b1f06f18ade4e58ba7ba42b09eeeb5d5 (diff)
Implement JMP
and get rid of arbitrary run limitation.
Diffstat (limited to 'eater_cpu/cpp/Veater_computer__main.cpp')
-rw-r--r--eater_cpu/cpp/Veater_computer__main.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/eater_cpu/cpp/Veater_computer__main.cpp b/eater_cpu/cpp/Veater_computer__main.cpp
index 4de8454..b4cd413 100644
--- a/eater_cpu/cpp/Veater_computer__main.cpp
+++ b/eater_cpu/cpp/Veater_computer__main.cpp
@@ -33,6 +33,8 @@ void load_program(const std::unique_ptr<Veater_computer> &topp) {
0x54,
// NOP
0x00,
+ // JMP -> @0
+ 0x60,
// HALT
0xf0};
std::copy(instructions.begin(), instructions.end(),
@@ -84,10 +86,6 @@ int main(int argc, char **argv, char **) {
contextp->timeInc(1);
topp->clk_in = !topp->clk_in;
-
- if (topp->eater_computer->PC_out == 6 &&
- topp->eater_computer->decoder__DOT__internal_state == 0x01)
- break;
}
contextp->timeInc(10);
tfp->dump(contextp->time());