zingen::jump::relocate

Function pc

Source
fn pc(buffer: &mut Buffer, original_pc: u16, target_pc: u16) -> Result<usize>
Expand description

Relocate program counter to buffer.

This function takes the original program counter and the target program counter, and updates the provided buffer with the necessary opcode instructions. It ensures that the buffer does not exceed the defined size limit and handles the conversion of the target program counter to the appropriate byte representation.