f8: Fix LNK opcode by preserving carry flag before clearing flags

This commit is contained in:
AJR 2018-12-03 22:53:38 -05:00
parent 785e40180d
commit a4b24c24a2

View File

@ -959,8 +959,9 @@ void f8_cpu_device::f8_com()
***************************************************/ ***************************************************/
void f8_cpu_device::f8_lnk() void f8_cpu_device::f8_lnk()
{ {
bool c = (m_w & C) != 0;
CLR_OZCS(); CLR_OZCS();
if (m_w & C) if (c)
m_a = do_add(m_a,1); m_a = do_add(m_a,1);
SET_SZ(m_a); SET_SZ(m_a);
} }