diff --git a/furvm/include/furvm/instruction.hpp b/furvm/include/furvm/instruction.hpp index 9a832d7..c0a524f 100644 --- a/furvm/include/furvm/instruction.hpp +++ b/furvm/include/furvm/instruction.hpp @@ -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. * diff --git a/furvm/src/main.cpp b/furvm/src/main.cpp index e6f849d..0ff8592 100644 --- a/furvm/src/main.cpp +++ b/furvm/src/main.cpp @@ -6,7 +6,9 @@ #include #include -static constexpr std::array s_bytecode = { +static constexpr std::array s_bytecode = { + furvm::byte(furvm::instruction_t::PushB2I), + 67, furvm::byte(furvm::instruction_t::Return), };