sh: Add shutdown command
This commit is contained in:
parent
75a10ffdc3
commit
5641fc6987
|
@ -33,6 +33,11 @@ shell_parse_command:
|
|||
call compare_string
|
||||
ifz jmp shell_help_command
|
||||
|
||||
; shutdown
|
||||
mov r1, shell_shutdown_command_string
|
||||
call compare_string
|
||||
ifz jmp shell_shutdown_command
|
||||
|
||||
; type
|
||||
mov r1, shell_type_command_string
|
||||
call compare_string
|
||||
|
@ -57,3 +62,4 @@ shell_invalid_command_string: data.str "invalid command or FXF binary" data.8 10
|
|||
#include "commands/exit.asm"
|
||||
#include "commands/help.asm"
|
||||
#include "commands/type.asm"
|
||||
#include "commands/shutdown.asm"
|
||||
|
|
|
@ -21,6 +21,7 @@ shell_help_text:
|
|||
data.str "exit | exit the shell" data.8 10
|
||||
data.str "help | show this help text" data.8 10
|
||||
data.str "type | print file $0 of type $1" data.8 10
|
||||
data.str "shutdown| turn the computer off" data.8 10
|
||||
data.8 10
|
||||
data.str "type the name of an FXF binary to launch" data.8 10
|
||||
data.str "it as a new task; the shell will suspend" data.8 10
|
||||
|
|
7
applications/sh/commands/shutdown.asm
Normal file
7
applications/sh/commands/shutdown.asm
Normal file
|
@ -0,0 +1,7 @@
|
|||
; shutdown command
|
||||
|
||||
shell_shutdown_command_string: data.str "shutdown" data.8 0
|
||||
|
||||
shell_shutdown_command:
|
||||
call poweroff
|
||||
ret
|
Loading…
Reference in New Issue
Block a user