 
 : call-unbox-func ( func -- )
     8 [
-        ! push vm ptr
-        temp-reg 0 MOV rc-absolute-cell rt-vm rel-fixup ! push the vm ptr as an argument
-        temp-reg PUSH
+        ! push the vm ptr as an argument
+        push-vm-ptr
         ! Push parameter
         EAX PUSH
         ! Call the unboxer

    #! parameter being passed to a callback from C.
    over [ load-return-reg ] [ 2drop ] if ;

M:: x86.32 %box ( n rep func -- )
    n rep (%box)
    rep rep-size [
        rep push-return-reg
        func f %alien-invoke
    ] with-aligned-stack ;


M: x86.32 %alien-invoke 0 CALL rc-relative rel-dlsym ;

: push-vm-ptr ( -- )
    temp-reg 0 MOV rc-absolute-cell rt-vm rel-fixup ! push the vm ptr as an argument
    temp-reg PUSH ;

M: x86.32 %vm-invoke ( function -- )
    push-vm-ptr
    f %alien-invoke
    temp-reg POP ;

