mirror of
https://github.com/felipecsl/6502Android.git
synced 2024-06-08 06:29:32 +00:00
17 lines
419 B
Kotlin
17 lines
419 B
Kotlin
|
package android.emu6502.instructions.impl
|
||
|
|
||
|
import android.emu6502.CPU
|
||
|
import android.emu6502.instructions.BaseInstruction
|
||
|
import android.emu6502.instructions.Instruction
|
||
|
|
||
|
/** Branch on Carry Clear */
|
||
|
final class BCC(private val cpu: CPU) : BaseInstruction(Instruction.BCC, cpu.instructionList) {
|
||
|
override fun branch() {
|
||
|
val offset = cpu.popByte()
|
||
|
if (!cpu.carry()) {
|
||
|
cpu.jumpBranch(offset)
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|