ASL - Arithmetic Shift Left
(info *stepInfo)
| 536 | |
| 537 | // ASL - Arithmetic Shift Left |
| 538 | func (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 |
| 553 | func (cpu *CPU) bcc(info *stepInfo) { |