From 1fdbd168ee010992571e31bbc2d7c665118d5ccf Mon Sep 17 00:00:00 2001 From: Xubiod <xubiod.mail@gmail.com> Date: Tue, 27 Feb 2024 10:20:06 -0500 Subject: [PATCH] incorrect register in TSX --- cpu/set_transfer.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpu/set_transfer.go b/cpu/set_transfer.go index 1614a89..7345b06 100644 --- a/cpu/set_transfer.go +++ b/cpu/set_transfer.go @@ -82,13 +82,13 @@ func (c *Core) TSX____i() { c.X = c.S - if c.Y == 0 { + if c.X == 0 { c.Flags = c.Flags | FLAG_ZERO } else { c.Flags = c.Flags & ^FLAG_ZERO } - if c.Y&0b10000000 > 0 { + if c.X&0b10000000 > 0 { c.Flags = c.Flags | FLAG_NEGATIVE } else { c.Flags = c.Flags & ^FLAG_NEGATIVE