Merge pull request #5 from folkertvanheusden/SWAB

SWAP & N flag
This commit is contained in:
Neil Webber 2024-03-29 10:08:42 -05:00 committed by GitHub
commit a6eceb1ace
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -83,7 +83,7 @@ def op_swab(cpu, inst):
val, xb6 = cpu.operandx(inst & 0o77, rmw=True) val, xb6 = cpu.operandx(inst & 0o77, rmw=True)
val = ((val >> 8) & cpu.MASK8) | ((val & cpu.MASK8) << 8) val = ((val >> 8) & cpu.MASK8) | ((val & cpu.MASK8) << 8)
cpu.psw_n = val & cpu.SIGN16 cpu.psw_n = val & cpu.SIGN8
# note this screwy definition, per the handbook # note this screwy definition, per the handbook
cpu.psw_z = ((val & cpu.MASK8) == 0) cpu.psw_z = ((val & cpu.MASK8) == 0)