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

Method Read16

nes/cpu.go:312–316  ·  view source on GitHub ↗

Read16 reads two bytes using Read to return a double-word value

(address uint16)

Source from the content-addressed store, hash-verified

310
311// Read16 reads two bytes using Read to return a double-word value
312func (cpu *CPU) Read16(address uint16) uint16 {
313 lo := uint16(cpu.Read(address))
314 hi := uint16(cpu.Read(address + 1))
315 return hi<<8 | lo
316}
317
318// read16bug emulates a 6502 bug that caused the low byte to wrap without
319// incrementing the high byte

Callers 5

ResetMethod · 0.95
StepMethod · 0.95
nmiMethod · 0.95
irqMethod · 0.95
brkMethod · 0.95

Calls 1

ReadMethod · 0.65

Tested by

no test coverage detected