#include <stdio.h>
#include <string.h>
#define NUM_BYTES 65536
{
while(!ose_bundleIsEmpty(vm_stack))
{
if(ose_peekType(vm_stack) == OSETT_MESSAGE)
{
if(ose_peekMessageArgType(vm_stack) == OSETT_INT32)
{
int32_t i = ose_popInt32(vm_stack);
printf("found an int: %d\n", i);
}
else
{
ose_drop(vm_stack);
}
}
else
{
ose_drop(vm_stack);
}
}
}
int main(int ac, char **av)
{
char bytes[NUM_BYTES];
ose_bundle bundle = ose_newBundleFromCBytes(NUM_BYTES, bytes);
1024, 1024, 1024, 1024, 1024);
ose_pushMessage(vm_env, "/printstack", strlen("/printstack"), 1,
OSETT_ALIGNEDPTR, printstack);
ose_pushMessage(vm_input, "/@/x", strlen("/@/x"), 1,
OSETT_INT32, 123);
osevm_run(vm);
ose_pushMessage(vm_input, "/$/x", strlen("/$/x"), 0);
osevm_run(vm);
ose_pushMessage(vm_input,
"/!/printstack",
strlen("/!/printstack"),
0);
osevm_run(vm);
return 0;
}
provides global definitions and types
contains functions that structure an OSC bundle for use with other parts of this library
contains functions that manipulate the structure and contents of an OSE bundle and its elements
#define OSEVM_INPUT(osevm)
Get the input bundle.
Definition ose_vm.h:362
#define OSEVM_ENV(osevm)
Get the environment bundle.
Definition ose_vm.h:374
#define OSEVM_STACK(osevm)
Get the stack bundle.
Definition ose_vm.h:368