 : %load-vm-addr ( reg -- ) vm-reg MR ;
 
 M: ppc %vm-field ( dst field -- ) [ vm-reg ] dip LWZ ;
+
+M: ppc %set-vm-field ( src field -- ) [ vm-reg ] dip STW ;
 
 GENERIC: loc-reg ( loc -- reg )
 

    } case ;

: next-param@ ( n -- reg x )
    2 1 stack-frame get total-size>> LWZ
    [ 2 ] dip param@ ;

: store-to-frame ( src n rep -- )
    {


M: ppc %end-callback ( -- )
    3 %load-vm-addr
    "end_callback" f %alien-invoke ;

M: ppc %end-callback-value ( ctype -- )
    ! Save top of data stack
    16 ds-reg 0 LWZ
    %end-callback
    ! Restore top of data stack
    3 16 MR
    ! Unbox former top of data stack to return registers
    unbox-return ;

