|
|
@ -84,6 +84,28 @@ CLI_CONFIRM_INPUT: |
|
|
|
mov [CLI_Command_Buffer], bx |
|
|
|
ret |
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
|
|
|
print_help_message: |
|
|
|
; Prints a list of available commands |
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
|
|
|
push si |
|
|
|
mov si, .command_list_string |
|
|
|
call print |
|
|
|
pop si |
|
|
|
ret |
|
|
|
.command_list_string: |
|
|
|
db 13, 10 |
|
|
|
db "Available commands:", 13, 10 |
|
|
|
db " help: Prints this screen", 13, 10 |
|
|
|
db " dumpmem: Prints the contents of a memory region (At the moment hardcoded)", 13, 10 |
|
|
|
db " keyprint: Prints the character and keycode for a key presssd", 13, 10 |
|
|
|
db " clear: Clears the screen", 13, 10 |
|
|
|
db " formatdisk: Initialize the file system", 13, 10 |
|
|
|
db " createfile: Name a file, in the file system", 13, 10 |
|
|
|
db " fsinfo: Displays info about the file system", 13, 10 |
|
|
|
db " ls: Lists the named files", 13, 10 |
|
|
|
db " svim: SingOS' text editor", 13, 10, 0 |
|
|
|
|
|
|
|
; Executes the command. |
|
|
|
CLI_EXECUTE: |
|
|
|
pusha |
|
|
@ -133,11 +155,11 @@ CLI_EXECUTE: |
|
|
|
.end: |
|
|
|
popa |
|
|
|
ret |
|
|
|
|
|
|
|
|
|
|
|
.tmp dw 0 |
|
|
|
.Num_Commands dw 8 |
|
|
|
.Command_Name_List dw .CMD1, .CMD2, .CMD3, .CMD4, .CMD5, .CMD6, .CMD7, .CMD8 |
|
|
|
.Command_Function_Pointers dw dumpmem_hardcoded_args, keyprint, svim, vsfs_list_files_command, vsfs_create_file, vsfs_format_disk, vsfs_get_fs_info, os_clear_screen |
|
|
|
.Num_Commands dw 9 |
|
|
|
.Command_Name_List dw .CMD1, .CMD2, .CMD3, .CMD4, .CMD5, .CMD6, .CMD7, .CMD8, .CMD9 |
|
|
|
.Command_Function_Pointers dw dumpmem_hardcoded_args, keyprint, svim, vsfs_list_files_command, vsfs_create_file, vsfs_format_disk, vsfs_get_fs_info, os_clear_screen, print_help_message |
|
|
|
.CMD1 db 'dumpmem', 0 |
|
|
|
.CMD2 db 'keyprint', 0 |
|
|
|
.CMD3 db 'svim', 0 |
|
|
@ -146,5 +168,6 @@ CLI_EXECUTE: |
|
|
|
.CMD6 db 'formatdisk', 0 |
|
|
|
.CMD7 db 'fsinfo', 0 |
|
|
|
.CMD8 db 'clear', 0 |
|
|
|
.CMD9 db 'help', 0 |
|
|
|
|
|
|
|
|