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

Method setN

nes/cpu.go:391–397  ·  view source on GitHub ↗

setN sets the negative flag if the argument is negative (high bit is set)

(value byte)

Source from the content-addressed store, hash-verified

389
390// setN sets the negative flag if the argument is negative (high bit is set)
391func (cpu *CPU) setN(value byte) {
392 if value&0x80 != 0 {
393 cpu.N = 1
394 } else {
395 cpu.N = 0
396 }
397}
398
399// setZN sets the zero flag and the negative flag
400func (cpu *CPU) setZN(value byte) {

Callers 2

setZNMethod · 0.95
bitMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected