|
|
@ -136,7 +136,15 @@ If the file is generated without any errors you can now include this file inside
|
|
|
|
To call your vasm routine all you must do is pass the label name as a template param...
|
|
|
|
To call your vasm routine all you must do is pass the label name as a template param...
|
|
|
|
|
|
|
|
|
|
|
|
```cpp
|
|
|
|
```cpp
|
|
|
|
// note, the header file generates an enum call "calls", inside of this enum will be an entry with the same name as your label!
|
|
|
|
#include <iostream>
|
|
|
|
// note, the second template param is the return type...
|
|
|
|
#include "test.hpp"
|
|
|
|
const auto hello = vm::call< vm::calls::get_hello, vm::u64 >();
|
|
|
|
|
|
|
|
|
|
|
|
int main()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
// note, the header file generates an enum call "calls", inside of this enum will be an entry with the same name as your label!
|
|
|
|
|
|
|
|
// note, the second template param is the return type...
|
|
|
|
|
|
|
|
const auto hello = vm::call< vm::calls::get_hello, vm::u64 >();
|
|
|
|
|
|
|
|
const auto world = vm::call< vm::calls::get_world, vm::u64 >();
|
|
|
|
|
|
|
|
std::printf( "> %s %s\n", ( char * )&hello, (char*)&world );
|
|
|
|
|
|
|
|
}
|
|
|
|
```
|
|
|
|
```
|