aboutsummaryrefslogtreecommitdiff
path: root/src/instructions.rs
diff options
context:
space:
mode:
authorkrolxon <krolyxon@tutanota.com>2026-01-08 19:02:18 +0530
committerkrolxon <krolyxon@tutanota.com>2026-01-08 19:02:18 +0530
commit133f6f748dd8d687273d991a134fad1c455ef99c (patch)
tree48817f643e8555a161ec88ab505a8354798920cf /src/instructions.rs
parent3372e774e9505acdc3778a8155476cca4bfbd3e8 (diff)
add CALL, RET
Diffstat (limited to 'src/instructions.rs')
-rw-r--r--src/instructions.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/instructions.rs b/src/instructions.rs
index 9f81b9a..620b0ad 100644
--- a/src/instructions.rs
+++ b/src/instructions.rs
@@ -14,6 +14,8 @@ pub enum Instruction {
CMP_RR = 0x09,
MUL = 0x0C,
DIV = 0x0D,
+ CALL = 0x0E,
+ RET = 0x0F,
HLT = 0xFF,
}
@@ -29,7 +31,10 @@ impl Instruction {
0x07 | 0x09 => "CMP",
0x0C => "MUL",
0x0D => "DIV",
+ 0x0E => "CALL",
+ 0x0F => "RET",
0xFF => "HLT",
+
_ => "???",
}
}