 
 [ jit-set-context ] \ (set-context) define-sub-primitive
 
+: jit-save-quot-and-param ( -- )
+    EDX ds-reg MOV
+    ds-reg 8 SUB ;
+
+: jit-push-param ( -- )
+    EAX EDX -4 [+] MOV
+    ds-reg 4 ADD
+    ds-reg [] EAX MOV ;
+
 : jit-start-context ( -- )
     ! Create the new context in return-reg
     jit-load-vm

    ESP 4 [+] ctx-reg MOV
    "reset_context" jit-call

    jit-pop-quot-and-param
    ctx-reg jit-switch-context
    jit-push-param
    jit-jump-quot ;

[

    ESP [] vm-reg MOV
    "new_context" jit-call

    jit-save-quot-and-param

    ! Make the new context active
    EAX jit-switch-context

    jit-push-param

    ! Windows-specific setup
    jit-install-seh
