Executing code

You can make a program start executing your code by calling proctal_execute.
The given instructions will be embedded at some place in memory and executed in a new stack frame in the context of the main thread. The other threads will be paused. Your code is free to modify any registers because they will be restored to their original values. Control will be given back to the program after the last instruction is executed.
The instructions cannot rely on where they will be placed in memory.
Here's how you would make a program execute 3 NO OPS on x86-64:

proctal_execute(proctal, "\x90\x90\x90", 3);

Check the Error handling page to learn how to deal with an error.