feat(furvm): add call instruction

This commit is contained in:
2026-06-11 15:09:30 +02:00
parent 6ca5fcc995
commit 3f6d0adef6
5 changed files with 33 additions and 5 deletions
+6 -4
View File
@@ -11,17 +11,19 @@
#include <iostream>
#include <memory>
static constexpr std::array<furvm::byte, 6> s_bytecode = {
static constexpr std::array<furvm::byte, 8> s_bytecode = {
furvm::byte(furvm::instruction_t::PushB2I),
67,
furvm::byte(furvm::instruction_t::Clone),
furvm::byte(furvm::instruction_t::Add),
furvm::byte(furvm::instruction_t::Drop),
furvm::byte(furvm::instruction_t::Call),
1,
0,
furvm::byte(furvm::instruction_t::Return),
};
void print(const furvm::executor_p& exec) {
std::cout << exec->pop_thing()->int32() << '\n';
void print(furvm::executor& exec) {
std::cout << exec.pop_thing()->int32() << '\n';
}
int main(void) {