%include "Ab/State.nasm"

extern ab_act

global ab_interpret_func

section .text

ab_interpret_func:
    call ab_act
    ret

%include "Ab/State.nasm"

extern ab_act

global ab_interpret_func

section .text

; Byte* ab_interpret_func(ExecState*, ExecAction)
ab_interpret_func:
    push rbx
    mov rbx, rdi
    call ab_act
    cmp byte [rbx + ExecState.st_b + ExecStateB.condition], ExecCond_HALTED
    je ab_exit
    int 3
ab_exit:
    pop rbx
    ret

Check the state->st_b.condition when returining from the interpreter
Check the state->st_b.condition when returining from the interpreter

Right now we are checking to make sure that the halted state is set.
This is not correct.  Eventually we will want to add a mechanism for
specifying if we are transfering from the interpreter to compiled code.

Signed-off-by: Andrew Young <9b1c84997b9b503084a7ab9e0b7da3894895a5c3@gmail.com>

ab-vm/ab,ab-vm/ab,ab-vm/ab,ab-vm/ab,ab-vm/ab