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

Method asl

nes/cpu.go:538–550  ·  view source on GitHub ↗

ASL - Arithmetic Shift Left

(info *stepInfo)

Source from the content-addressed store, hash-verified

536
537// ASL - Arithmetic Shift Left
538func (cpu *CPU) asl(info *stepInfo) {
539 if info.mode == modeAccumulator {
540 cpu.C = (cpu.A >> 7) & 1
541 cpu.A <<= 1
542 cpu.setZN(cpu.A)
543 } else {
544 value := cpu.Read(info.address)
545 cpu.C = (value >> 7) & 1
546 value <<= 1
547 cpu.Write(info.address, value)
548 cpu.setZN(value)
549 }
550}
551
552// BCC - Branch if Carry Clear
553func (cpu *CPU) bcc(info *stepInfo) {

Callers

nothing calls this directly

Calls 3

setZNMethod · 0.95
ReadMethod · 0.65
WriteMethod · 0.65

Tested by

no test coverage detected