aboutsummaryrefslogtreecommitdiff
path: root/emergencyshell.asm
diff options
context:
space:
mode:
Diffstat (limited to 'emergencyshell.asm')
-rw-r--r--emergencyshell.asm68
1 files changed, 68 insertions, 0 deletions
diff --git a/emergencyshell.asm b/emergencyshell.asm
new file mode 100644
index 0000000..0824f64
--- /dev/null
+++ b/emergencyshell.asm
@@ -0,0 +1,68 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ push msgEnteringShell
+ call jaspos_monitor_dispstring
+.eshell:
+ push msgPrompt
+ call jaspos_monitor_dispstring ; Show the prompt
+
+ push free_ram ; Buffer = free ram
+ push 32d ; Max chars to read = 32
+ call jaspos_keyb_getstring ; Get a command
+
+ push msgNewLine
+ call jaspos_monitor_dispstring
+
+ push free_ram
+ call jaspos_strutils_tolower
+
+ push cmdExit
+ push free_ram
+ call jaspos_strutils_compare
+ jz .quit
+
+ push cmdVersion
+ push free_ram
+ call jaspos_strutils_compare
+ jz .eshell_version
+
+ push cmdCompileDate
+ push free_ram
+ call jaspos_strutils_compare
+ jz .eshell_compiledate
+
+ push cmdOff
+ push free_ram
+ call jaspos_strutils_compare
+ jz .eshell_off
+
+ push cmdHelp
+ push free_ram
+ call jaspos_strutils_compare
+ jz .eshell_help
+
+
+ jmp .eshell
+
+
+.eshell_version:
+ push msgVersion
+ call jaspos_monitor_dispstring
+ jmp .eshell
+
+.eshell_compiledate:
+ push msgCompileDate
+ call jaspos_monitor_dispstring
+ jmp .eshell
+
+.eshell_off:
+ call jaspos_power_connect
+ jmp jaspos_power_shutdown
+
+.eshell_help:
+ push msgShellHelp
+ call jaspos_monitor_dispstring
+ jmp .eshell
+
+.quit: \ No newline at end of file