From ebdf50cdf3a357a0e37a5751fd9d78ae975979a0 Mon Sep 17 00:00:00 2001 From: vin Date: Mon, 10 Jun 2024 12:55:40 +0530 Subject: [PATCH] implement tay, txa, tya --- cpu.c | 15 ++++++++++++--- 1 file 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