1
0
mirror of https://github.com/lefticus/6502-cpp.git synced 2026-04-21 02:17:01 +00:00

Implement a bunch more instructions

This commit is contained in:
Jason Turner
2021-05-08 17:58:14 -06:00
parent f79a189a12
commit d2241528e5
3 changed files with 123 additions and 45 deletions
+9
View File
@@ -17,6 +17,15 @@ struct C64 : Personality
new_instructions.emplace_back(ASMLine::Type::Directive, ".byt $0B,$08,$0A,$00,$9E,$32,$30,$36,$31,$00,$00,$00");
}
[[nodiscard]] std::string_view stack_low_address() const override
{
return "$02";
}
[[nodiscard]] std::string_view stack_high_address() const override
{
return "$03";
}
[[nodiscard]] Operand get_register(const int reg_num) const override
{
switch (reg_num) {
+2
View File
@@ -9,6 +9,8 @@ class Personality
public:
virtual void insert_autostart_sequence(std::vector<mos6502> &new_instructions) const = 0;
[[nodiscard]] virtual Operand get_register(const int reg_num) const = 0;
[[nodiscard]] virtual std::string_view stack_low_address() const = 0;
[[nodiscard]] virtual std::string_view stack_high_address() const= 0;
virtual ~Personality() = default;
Personality(const Personality &) = delete;