feat(furvm): add push byte as int instruction
This commit is contained in:
@@ -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
@@ -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),
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user