From 552fad8a7e06af854348561087fe4a67d838f3a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Kujawa?= Date: Mon, 23 Jan 2017 14:43:54 +0100 Subject: [PATCH] LDY emulation. --- src/emulation.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/emulation.c b/src/emulation.c index dd9637a..206b4ac 100644 --- a/src/emulation.c +++ b/src/emulation.c @@ -82,6 +82,16 @@ emul_ldx(rk65c02emu_t *e, void *id, instruction_t *i) instruction_status_adjust_negative(e, e->regs.X); } +/* LDY - load to Y */ +void +emul_ldy(rk65c02emu_t *e, void *id, instruction_t *i) +{ + e->regs.Y = instruction_data_read_1(e, (instrdef_t *) id, i); + + instruction_status_adjust_zero(e, e->regs.Y); + instruction_status_adjust_negative(e, e->regs.Y); +} + /* NOP - do nothing */ void emul_nop(rk65c02emu_t *e, void *id, instruction_t *i)