fn compute_offset(cpu: &mut CpuState, instr: &Instruction) -> u16 {
    let offset: u16;
    let bits = instr.code;
    if immediate_bit![bits] {
        // Register shifted offset (as in data processing type instruction)
        let mut carry: u8 = 0;
        offset = reg_offset_shift(cpu, instr, &mut carry) as u16;
    } else {
        offset = offset_bits![bits];
    }
    offset
}
/// Computes the offset of an SDT instruction
Computes the offset of an SDT instruction
Computes the offset of an SDT instruction
fn compute_offset(cpu: &mut CpuState, instr: &Instruction) -> u16 {
    let offset: u16;
    let bits = instr.code;
    if immediate_bit![bits] {
        // Register shifted offset (as in data processing type instruction)
        let mut carry: u8 = 0;
        offset = reg_offset_shift(cpu, instr, &mut carry) as u16;
    } else {
        offset = offset_bits![bits];
    }
    offset
}
fn compute_offset ( cpu : & mut CpuState , instr : & Instruction ) -> u16 { let offset : u16 ; let bits = instr . code ; if immediate_bit ! [ bits ] { // Register shifted offset (as in data processing type instruction) let mut carry : u8 = 0 ; offset = reg_offset_shift ( cpu , instr , & mut carry ) as u16 ; } else { offset = offset_bits ! [ bits ] ; } offset }
Computes the offset of an SDT instruction
Computes the offset of an SDT instruction
cpu
&mut CpuState
instr
&Instruction