diff options
| Commit | 448f86e335b8ecd4699c2eadc03fc97ca0bdc19f (patch) | |
|---|---|---|
| Author | 2025-02-15 09:25:45 +0200 | |
| Committer | 2025-02-15 09:25:45 +0200 | |
| Files | 97dbbea8919a02ff1bc222a54538d174da8488db | |
| tonkobali-448f86e335b8ecd4699c2eadc03fc97ca0bdc19f.tar tonkobali-448f86e335b8ecd4699c2eadc03fc97ca0bdc19f.tar.gz tonkobali-448f86e335b8ecd4699c2eadc03fc97ca0bdc19f.zip | ||
| Parent | e7656f12d0ab604c40df10d6777ddb8c608a5bfd (diff) | |
feat(vmm): Help menu
1 files changed, 29 insertions, 0 deletions
| -rw-r--r-- | vm/src/vmm/command.rs | 29 |
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(':'); |
