aboutsummaryrefslogtreecommitdiff
path: root/emergencyshell.asm
blob: 0824f648f92f5f7ce893d1b4b95754c8e42ddf7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
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: