fn pop_helper(ctx: &mut impl CpuContext) -> u16 {
    ctx.yield1m();
    let addr = ctx.cpustate_mut().regs.inc_sp();
    let low = ctx.mem().read(addr.into());

    ctx.yield1m();
    let addr = ctx.cpustate_mut().regs.inc_sp();
    let high = ctx.mem().read(addr.into());

    u16::from_le_bytes([low, high])
}
/// Pop helper, shared between pop and ret. Pops value from the stack, waiting 1m between each byte
/// and incrementing the stack pointer by 2.
Pop helper, shared between pop and ret. Pops value from the stack, waiting 1m between each byte
and incrementing the stack pointer by 2.
Pop helper shared between pop and ret . Pops value from the stack waiting 1m between each byte and incrementing the stack pointer by 2 .
fn pop_helper(ctx: &mut impl CpuContext) -> u16 {
    ctx.yield1m();
    let addr = ctx.cpustate_mut().regs.inc_sp();
    let low = ctx.mem().read(addr.into());
    ctx.yield1m();
    let addr = ctx.cpustate_mut().regs.inc_sp();
    let high = ctx.mem().read(addr.into());
    u16::from_le_bytes([low, high])
}
fn pop_helper ( ctx : & mut impl CpuContext ) -> u16 { ctx . yield1m ( ) ; let addr = ctx . cpustate_mut ( ) . regs . inc_sp ( ) ; let low = ctx . mem ( ) . read ( addr . into ( ) ) ; ctx . yield1m ( ) ; let addr = ctx . cpustate_mut ( ) . regs . inc_sp ( ) ; let high = ctx . mem ( ) . read ( addr . into ( ) ) ; u16 :: from_le_bytes ( [ low , high ] ) }
Pop helper, shared between pop and ret.
Pop helper shared between pop and ret .
ctx
&mut impl CpuContext
ctx
&mut impl CpuContext