From 4c8a7971f32558b3d4fd75616c37a4fd43783c1d Mon Sep 17 00:00:00 2001 From: _xeroxz Date: Mon, 7 Jun 2021 07:52:20 +0000 Subject: [PATCH] Update README.md --- README.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9e89cff..2d5b17f 100644 --- a/README.md +++ b/README.md @@ -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... ```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! -// note, the second template param is the return type... -const auto hello = vm::call< vm::calls::get_hello, vm::u64 >(); +#include +#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 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 ); +} ``` \ No newline at end of file