From 448f86e335b8ecd4699c2eadc03fc97ca0bdc19f Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sat, 15 Feb 2025 09:25:45 +0200 Subject: feat(vmm): Help menu --- vm/src/vmm/command.rs | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'vm/src') 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!("
is a usize constant + 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
Start normal execution at ADDRESS + Only applicable when 'HALTED' + +Single-step execution: + s, single
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: +
Print the value at the location +
.
Print the values between the locations + (inclusive range) +
: Set value at ADDRESS to VALUE +"); + }, _ => { for arg in args { let assignment = arg.contains(':'); -- cgit v1.3.1-23-gd82d