Update README.md

merge-requests/2/head
_xeroxz 4 years ago
parent bedfcaf02a
commit 4c8a7971f3

@ -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
#include <iostream>
#include "test.hpp"
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 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... // note, the second template param is the return type...
const auto hello = vm::call< vm::calls::get_hello, vm::u64 >(); 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 );
}
``` ```
Loading…
Cancel
Save