summaryrefslogtreecommitdiff
path: root/cpu.c
diff options
context:
space:
mode:
authorvin <git@vineetk.net>2024-06-10 12:55:40 +0530
committervin <git@vineetk.net>2024-06-10 14:28:13 +0530
commitebdf50cdf3a357a0e37a5751fd9d78ae975979a0 (patch)
tree51add6cf1a1e0dccd90d56aa2c4e854267770a27 /cpu.c
parent454276a50c5843e3401f9bc54d80cb7dda40b782 (diff)
implement tay, txa, tya
Diffstat (limited to 'cpu.c')
-rw-r--r--cpu.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/cpu.c b/cpu.c
index acb4efb..d754c15 100644
--- a/cpu.c
+++ b/cpu.c
@@ -588,7 +588,10 @@ tax(void)
static void
tay(uint8_t arg)
{
-/* TODO: complete this */
+ regs.y = regs.a;
+
+ STATUS_UPDATE_ZERO(regs.y);
+ STATUS_UPDATE_NEGATIVE(regs.y);
}
static void
@@ -600,7 +603,10 @@ tsx(uint8_t arg)
static void
txa(uint8_t arg)
{
-/* TODO: complete this */
+ regs.a = regs.x;
+
+ STATUS_UPDATE_ZERO(regs.a);
+ STATUS_UPDATE_NEGATIVE(regs.a);
}
static void
@@ -612,7 +618,10 @@ txs(uint8_t arg)
static void
tya(uint8_t arg)
{
-/* TODO: complete this */
+ regs.a = regs.y;
+
+ STATUS_UPDATE_ZERO(regs.a);
+ STATUS_UPDATE_NEGATIVE(regs.a);
}
static void