chore: minor edits to documentation
This commit is contained in:
parent
5d6df46a2d
commit
1b78b248a3
|
@ -104,10 +104,10 @@ impl Cpu {
|
||||||
Instruction::execute(self, instruction)
|
Instruction::execute(self, instruction)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Perform the [`Cpu::fetch()`] [`Cpu::decode(opcode)`] [`Cpu::execute(instr)`]
|
/// Perform the [`Cpu::fetch()`] [`Cpu::decode()`] [`Cpu::execute()`]
|
||||||
/// routine.
|
/// routine.
|
||||||
///
|
///
|
||||||
/// Handle HALT state and interrupts.
|
/// Handle HALT and interrupts.
|
||||||
pub fn step(&mut self) -> Cycle {
|
pub fn step(&mut self) -> Cycle {
|
||||||
// Log instructions
|
// Log instructions
|
||||||
// if self.reg.pc > 0xFF {
|
// if self.reg.pc > 0xFF {
|
||||||
|
|
|
@ -1531,7 +1531,8 @@ impl Instruction {
|
||||||
|
|
||||||
/// Set program counter to Address.
|
/// Set program counter to Address.
|
||||||
///
|
///
|
||||||
/// This is explicitly meant to emulate the exact behaviour of JP, JR RET, RETI and CALL
|
/// This is explicitly meant to emulate the exact behaviour of [`Instruction::JP`], [`Instruction::JR`]
|
||||||
|
/// [`Instruction::RET`], [`Instruction::RETI`]
|
||||||
/// (4 cycles)
|
/// (4 cycles)
|
||||||
fn jump(cpu: &mut Cpu, addr: u16) {
|
fn jump(cpu: &mut Cpu, addr: u16) {
|
||||||
cpu.set_register_pair(RegisterPair::PC, addr);
|
cpu.set_register_pair(RegisterPair::PC, addr);
|
||||||
|
|
Loading…
Reference in New Issue