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

Method SetFlags

nes/cpu.go:370–379  ·  view source on GitHub ↗

SetFlags sets the processor status flags

(flags byte)

Source from the content-addressed store, hash-verified

368
369// SetFlags sets the processor status flags
370func (cpu *CPU) SetFlags(flags byte) {
371 cpu.C = (flags >> 0) & 1
372 cpu.Z = (flags >> 1) & 1
373 cpu.I = (flags >> 2) & 1
374 cpu.D = (flags >> 3) & 1
375 cpu.B = (flags >> 4) & 1
376 cpu.U = (flags >> 5) & 1
377 cpu.V = (flags >> 6) & 1
378 cpu.N = (flags >> 7) & 1
379}
380
381// setZ sets the zero flag if the argument is zero
382func (cpu *CPU) setZ(value byte) {

Callers 4

ResetMethod · 0.95
plpMethod · 0.95
rtiMethod · 0.95
mainFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected