Add call AM operation

This commit is contained in:
2025-08-10 21:33:25 +01:00
parent 426d270318
commit 167e91d816
4 changed files with 34 additions and 7 deletions

View File

@@ -53,3 +53,11 @@ void am_assign(am_t *am, am_reg_t dest, am_reg_t src)
{
am->regs[dest] = am->regs[src];
}
void am_call(am_t *am, am_reg_t proc)
{
assert(am->regs[proc]->is_atom);
assert(am->regs[proc]->atom.type == ATOM_TYPE_PRIM_PROC);
assert(am->regs[proc]->atom.prim_proc != NULL);
am->regs[proc]->atom.prim_proc(am);
}