Merge pull request #10 from neuschaefer/dev

sh: Add shutdown command
This commit is contained in:
Ry 2023-01-30 13:06:31 -08:00 committed by GitHub
commit 01fd9a5eac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 0 deletions

View File

@ -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"

View File

@ -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

View File

@ -0,0 +1,7 @@
; shutdown command
shell_shutdown_command_string: data.str "shutdown" data.8 0
shell_shutdown_command:
call poweroff
ret