From b21d884f8b335f6ddfe5a2794658a7c739009611 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Kujawa?= Date: Tue, 31 Jan 2017 00:31:04 +0100 Subject: [PATCH] Clear the decimal flag on initialisation. --- src/rk65c02.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/rk65c02.c b/src/rk65c02.c index 9b91632..f8de7f5 100644 --- a/src/rk65c02.c +++ b/src/rk65c02.c @@ -23,6 +23,8 @@ rk65c02_init(bus_t *b) e.bus = b; e.state = STOPPED; e.regs.P = P_UNDEFINED|P_IRQ_DISABLE; + /* reset also clears the decimal flag */ + e.regs.P &= ~P_DECIMAL; return e; }