From b0c790f3c63a19ced779adaf5d91c4eb738c824e Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Tue, 19 Jan 2021 21:54:15 -0500 Subject: [PATCH] Adds enough flags seemingly to reach an ASL. --- InstructionSets/M50740/Executor.cpp | 4 ++++ InstructionSets/M50740/Executor.hpp | 2 ++ 2 files changed, 6 insertions(+) diff --git a/InstructionSets/M50740/Executor.cpp b/InstructionSets/M50740/Executor.cpp index c90b5afdf..5b73a939e 100644 --- a/InstructionSets/M50740/Executor.cpp +++ b/InstructionSets/M50740/Executor.cpp @@ -170,6 +170,10 @@ template void Executor::perform(uint8_t *operand [[maybe_u case Operation::CLI: interrupt_disable_ = 0x00; break; case Operation::SEI: interrupt_disable_ = 0xff; break; + case Operation::CLT: index_mode_ = false; break; + case Operation::SET: index_mode_ = true; break; + case Operation::CLD: decimal_mode_ = false; break; + case Operation::SED: decimal_mode_ = true; break; default: printf("Unimplemented operation: %d\n", int(operation)); diff --git a/InstructionSets/M50740/Executor.hpp b/InstructionSets/M50740/Executor.hpp index 533cf7606..9f3b71fcc 100644 --- a/InstructionSets/M50740/Executor.hpp +++ b/InstructionSets/M50740/Executor.hpp @@ -115,6 +115,8 @@ class Executor: public CachingExecutor { uint8_t negative_result_ = 0; uint8_t zero_result_ = 0; uint8_t interrupt_disable_ = 0; + bool index_mode_ = false; + bool decimal_mode_ = false; }; }