- Main Page
- Related Pages
- Modules
- Data Structures
- Files
- Examples

Functions
Virtual Machine Functions
Embryo

Resets the current virtual machine session of the given program. More...

## Functions
EAPI void | embryo_program_vm_push (Embryo_Program *ep)
| Starts a new virtual machine session for the given program. More...
EAPI void | embryo_program_vm_pop (Embryo_Program *ep)
| Frees the current virtual machine session associated with the given program. More...

## Detailed Description

Resets the current virtual machine session of the given program.

Parameters

  ep | The given program.

Functions that deal with creating and destroying virtual machine sessions for a given program.

A given embryo program can have multiple virtual machine sessions running. This is useful when you have a native call that in turn calls a function in the embryo program. The native call can start a new virtual machine session to run the function it needs. Once completed, the session can be popped off the program's stack, and the native call can return its value to the old session.

A new virtual machine session is created by pushing a new virtual machine onto the session stack of a program using embryo_program_vm_push. The current virtual machine session can be destroyed by calling embryo_program_vm_pop.

## Function Documentation

EAPI void embryo_program_vm_push | ( | Embryo_Program * | ep | ) |

Starts a new virtual machine session for the given program.

See Virtual Machine Functions for more information about how this works.

Parameters

  ep | The given program.

EAPI void embryo_program_vm_pop | ( | Embryo_Program * | ep | ) |

Frees the current virtual machine session associated with the given program.

See Virtual Machine Functions for more information about how this works. Note that you will need to retrieve any return data or data on the stack before you pop.

Parameters

  ep | The given program.