feat(furvm): add push byte as int instruction

This commit is contained in:
2026-06-06 17:49:49 +02:00
parent c6ec18aeb8
commit 16b6b9549c
2 changed files with 10 additions and 1 deletions
+7
View File
@@ -11,6 +11,13 @@ enum class instruction_t : byte {
*/
NoOperation = 0,
/**
* @brief Pushes an integer from a byte onto the stack.
*
* Pushes an integer constructed from a next byte onto the stack.
*/
PushB2I,
/**
* @brief Pushes a constant onto the stack.
*
+3 -1
View File
@@ -6,7 +6,9 @@
#include <array>
#include <cstddef>
static constexpr std::array<furvm::byte, 1> s_bytecode = {
static constexpr std::array<furvm::byte, 3> s_bytecode = {
furvm::byte(furvm::instruction_t::PushB2I),
67,
furvm::byte(furvm::instruction_t::Return),
};