setZ sets the zero flag if the argument is zero
(value byte)
| 380 | |
| 381 | // setZ sets the zero flag if the argument is zero |
| 382 | func (cpu *CPU) setZ(value byte) { |
| 383 | if value == 0 { |
| 384 | cpu.Z = 1 |
| 385 | } else { |
| 386 | cpu.Z = 0 |
| 387 | } |
| 388 | } |
| 389 | |
| 390 | // setN sets the negative flag if the argument is negative (high bit is set) |
| 391 | func (cpu *CPU) setN(value byte) { |