MCPcopy
hub / github.com/fogleman/nes / setZ

Method setZ

nes/cpu.go:382–388  ·  view source on GitHub ↗

setZ sets the zero flag if the argument is zero

(value byte)

Source from the content-addressed store, hash-verified

380
381// setZ sets the zero flag if the argument is zero
382func (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)
391func (cpu *CPU) setN(value byte) {

Callers 2

setZNMethod · 0.95
bitMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected