Low Level API¶
The low-level API of
bare68k is found in the
module. Here the direct native calls to the
machine extension are
The functions allow to read and write the current CPU state. All data
d0-d7 and address registers
a0-a7 are available. Additionally,
special registers like
USP user space stack pointer and
vector base register can be read and written.
bare68k.api.cpu module wraps machine’s CPU access functions.
get_cpu_context= <Mock name='mock.get_cpu_context' id='139892085812752'>¶
Read the CPU context including all registers.
Read the CPU context if you want to save the entire state. You can later restore the full CPU state with
CPUContextnative context object contains stored state
set_cpu_context= <Mock name='mock.set_cpu_context' id='139892085872720'>¶
Set the CPU context including all registers.
After getting the CPU state with
get_cpu_context()you can restore the state with this function.
Parameters: ctx (
CPUContext) – native context object with state to restore