fn push_helper(ctx: &mut impl CpuContext, val: u16) {
    let [low, high] = val.to_le_bytes();
    ctx.yield1m();
    let addr = ctx.cpustate_mut().regs.dec_sp();
    ctx.mem_mut().write(addr.into(), high);

    ctx.yield1m();
    let addr = ctx.cpustate_mut().regs.dec_sp();
    ctx.mem_mut().write(addr.into(), low);
}
/// Push helper, shared between push and call. Pushes a caller-supplied 16 bit value onto the stack,
/// waiting 1m between each byte and decrementing the stack pointer by 2.
Push helper, shared between push and call. Pushes a caller-supplied 16 bit value onto the stack,
waiting 1m between each byte and decrementing the stack pointer by 2.
Push helper shared between push and call . Pushes a caller - supplied 16 bit value onto the stack waiting 1m between each byte and decrementing the stack pointer by 2 .
fn push_helper(ctx: &mut impl CpuContext, val: u16) {
    let [low, high] = val.to_le_bytes();
    ctx.yield1m();
    let addr = ctx.cpustate_mut().regs.dec_sp();
    ctx.mem_mut().write(addr.into(), high);
    ctx.yield1m();
    let addr = ctx.cpustate_mut().regs.dec_sp();
    ctx.mem_mut().write(addr.into(), low);
}
fn push_helper ( ctx : & mut impl CpuContext , val : u16 ) { let [ low , high ] = val . to_le_bytes ( ) ; ctx . yield1m ( ) ; let addr = ctx . cpustate_mut ( ) . regs . dec_sp ( ) ; ctx . mem_mut ( ) . write ( addr . into ( ) , high ) ; ctx . yield1m ( ) ; let addr = ctx . cpustate_mut ( ) . regs . dec_sp ( ) ; ctx . mem_mut ( ) . write ( addr . into ( ) , low ) ; }
Push helper, shared between push and call.
Push helper shared between push and call .
ctx
&mut impl CpuContext
val
u16
ctx
&mut impl CpuContext
val
u16