Website Summary Files Commits Branches @commit @diff @stats
path: root / vm / src
diff options
context:
space:
mode:
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(':');