sh: Add echo
command
This commit is contained in:
parent
7a2f96717e
commit
f6ec0dde0b
|
@ -26,6 +26,11 @@ shell_parse_command:
|
||||||
call compare_string
|
call compare_string
|
||||||
ifz jmp shell_diskrm_command
|
ifz jmp shell_diskrm_command
|
||||||
|
|
||||||
|
; echo
|
||||||
|
mov r1, shell_echo_command_string
|
||||||
|
call compare_string
|
||||||
|
ifz jmp shell_echo_command
|
||||||
|
|
||||||
; exit
|
; exit
|
||||||
mov r1, shell_exit_command_string
|
mov r1, shell_exit_command_string
|
||||||
call compare_string
|
call compare_string
|
||||||
|
@ -72,6 +77,7 @@ shell_invalid_command_string: data.str "invalid command or FXF binary" data.8 10
|
||||||
#include "commands/dir.asm"
|
#include "commands/dir.asm"
|
||||||
#include "commands/disk.asm"
|
#include "commands/disk.asm"
|
||||||
#include "commands/diskrm.asm"
|
#include "commands/diskrm.asm"
|
||||||
|
#include "commands/echo.asm"
|
||||||
#include "commands/exit.asm"
|
#include "commands/exit.asm"
|
||||||
#include "commands/help.asm"
|
#include "commands/help.asm"
|
||||||
#include "commands/rdall.asm"
|
#include "commands/rdall.asm"
|
||||||
|
|
11
applications/sh/commands/echo.asm
Normal file
11
applications/sh/commands/echo.asm
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
; clear command
|
||||||
|
|
||||||
|
shell_echo_command_string: data.strz "echo"
|
||||||
|
|
||||||
|
shell_echo_command:
|
||||||
|
mov r0, [shell_args_ptr]
|
||||||
|
call print_str_to_terminal
|
||||||
|
mov r0, 10
|
||||||
|
call print_character_to_terminal
|
||||||
|
|
||||||
|
ret
|
|
@ -20,6 +20,7 @@ shell_help_text:
|
||||||
data.str "dir | show contents of selected disk" data.8 10
|
data.str "dir | show contents of selected disk" data.8 10
|
||||||
data.str "disk | select disk $0" data.8 10
|
data.str "disk | select disk $0" data.8 10
|
||||||
data.str "diskrm | remove disk $0" data.8 10
|
data.str "diskrm | remove disk $0" data.8 10
|
||||||
|
data.str "echo | print the specified text" data.8 10
|
||||||
data.str "exit | exit the shell" data.8 10
|
data.str "exit | exit the shell" data.8 10
|
||||||
data.str "help | show this help text" data.8 10
|
data.str "help | show this help text" data.8 10
|
||||||
data.str "rdall | redirect all IO to $0" data.8 10
|
data.str "rdall | redirect all IO to $0" data.8 10
|
||||||
|
|
Loading…
Reference in New Issue
Block a user