From 48d11484cc6e0b26627af6259e238fe29421962c Mon Sep 17 00:00:00 2001 From: uvok Date: Thu, 22 Jan 2026 19:37:00 +0100 Subject: Implement STA --- eater_cpu/cpp/Veater_computer__main.cpp | 3 +++ eater_cpu/cpp/simpc_term.cpp | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'eater_cpu/cpp') diff --git a/eater_cpu/cpp/Veater_computer__main.cpp b/eater_cpu/cpp/Veater_computer__main.cpp index c415454..fbfc978 100644 --- a/eater_cpu/cpp/Veater_computer__main.cpp +++ b/eater_cpu/cpp/Veater_computer__main.cpp @@ -24,6 +24,9 @@ void load_program(const std::unique_ptr &topp) { 0x2f, // SUB 13 0x3d, + // STA 12 + 0x4c, + // OUT 0xe0, // NOP diff --git a/eater_cpu/cpp/simpc_term.cpp b/eater_cpu/cpp/simpc_term.cpp index c08deed..2ac3895 100644 --- a/eater_cpu/cpp/simpc_term.cpp +++ b/eater_cpu/cpp/simpc_term.cpp @@ -1,4 +1,5 @@ #include "Veater_computer_eater_register.h" +#include "Veater_computer_my_mem__DB10.h" #include "simpc_ui.h" #define NCUR_X 5 @@ -35,7 +36,7 @@ static void handle_key(); void simpc_ui_write(const std::unique_ptr &topp, uint64_t i) { // clk hi->lo doesn't do anything, just skip this. - if (i !=0 && !topp->clk_in) + if (i != 0 && !topp->clk_in) return; // uint16_t opcode = topp->eater_computer->; uint8_t opcode = topp->eater_computer->INS->r_datastore; @@ -109,6 +110,11 @@ void simpc_ui_finish_message(const std::unique_ptr &contextp, PRINT_ME_W(status_top, 1, xpos, "%s", msg); attroff(A_BOLD); + + for (int idx = 0; idx < topp->eater_computer->RAM->r_datastore.size(); + idx++) { + printf("Mem[%2d] = 0X%02X\n", idx, topp->eater_computer->RAM->r_datastore[idx]); + } } void simpc_ui_init(void) {} -- cgit v1.2.3