Website Summary Files Commits Branches @commit @diff @stats
path: root / vm / src
diff options
context:
space:
mode:
Commit448f86e335b8ecd4699c2eadc03fc97ca0bdc19f (patch)
Author
 Syndamia <kamen@syndamia.com>
2025-02-15 09:25:45 +0200
Committer
 Syndamia <kamen@syndamia.com>
2025-02-15 09:25:45 +0200
Files97dbbea8919a02ff1bc222a54538d174da8488db /vm/src
tonkobali-448f86e335b8ecd4699c2eadc03fc97ca0bdc19f.tar
tonkobali-448f86e335b8ecd4699c2eadc03fc97ca0bdc19f.tar.gz
tonkobali-448f86e335b8ecd4699c2eadc03fc97ca0bdc19f.zip
Parente7656f12d0ab604c40df10d6777ddb8c608a5bfd (diff)
feat(vmm): Help menu
1 files changed, 29 insertions, 0 deletions
-rw-r--r--vm/src/vmm/command.rs29
diff --git a/vm/src/vmm/command.rs b/vm/src/vmm/command.rs
index 6791663..188030e 100644
--- a/vm/src/vmm/command.rs
+++ b/vm/src/vmm/command.rs
@@ -110,6 +110,35 @@ pub(super) fn parse_and_exec(input: String, vm: &mut VirtualMachine) -> Result<(
/* Other */
"q" | "quit" | "e" | "exit" => return Err(String::new()),
+ "h" | "?" | "help" => {
+ print!("<ADDRESS> is a usize constant
+<VALUE> is a Word (i64) constant
+
+Multiple 'Memory IO' commands may be put on a single line, when
+separated by spaces
+
+General commands:
+ h, ?, help This menu
+ q, e, quit, exit Stop and exit the virtual machine
+
+Normal execution:
+ r, run <ADDRESS> Start normal execution at ADDRESS
+ Only applicable when 'HALTED'
+
+Single-step execution:
+ s, single <ADDRESS> Start single-step execution at ADDRESS
+ c, continue Resume normal execution
+ Only applicable when in 'STEP' mode
+ n, next Execute next instruction
+ Only applicable when in 'STEP' mode
+
+Memory IO:
+ <ADDRESS> Print the value at the location
+ <ADDRESS>.<ADDRESS> Print the values between the locations
+ (inclusive range)
+ <ADDRESS>:<VALUE> Set value at ADDRESS to VALUE
+");
+ },
_ => {
for arg in args {
let assignment = arg.contains(':');