Added a os_upper_case function
This commit is contained in:
@@ -22,30 +22,41 @@ os_read_cli:
|
||||
call os_print_newline
|
||||
|
||||
.check_matches: ; Check if the user input matches any internal commands
|
||||
mov si, user_input
|
||||
mov di, help_string
|
||||
; Help
|
||||
mov di, user_input
|
||||
mov si, help_string
|
||||
call os_compare_strings
|
||||
cmp cl, 1
|
||||
je help
|
||||
|
||||
mov si, user_input
|
||||
mov di, clear_string
|
||||
; Clear screen
|
||||
mov di, user_input
|
||||
mov si, clear_string
|
||||
call os_compare_strings
|
||||
cmp cl, 1
|
||||
je clear
|
||||
|
||||
; Reboot
|
||||
mov di, user_input
|
||||
mov si, reboot_string
|
||||
call os_compare_strings
|
||||
cmp cl, 1
|
||||
je os_reboot
|
||||
|
||||
; Reboot
|
||||
mov di, user_input
|
||||
mov si, cat_string
|
||||
call os_compare_strings
|
||||
cmp cl, 1
|
||||
je cat
|
||||
|
||||
mov si, user_input
|
||||
mov di, pong_string
|
||||
; Pong
|
||||
mov di, user_input
|
||||
mov si, pong_string
|
||||
call os_compare_strings
|
||||
cmp cl, 1
|
||||
je pong
|
||||
|
||||
mov si, user_input
|
||||
mov di, snake_string
|
||||
call os_compare_strings
|
||||
cmp cl, 1
|
||||
je snake
|
||||
|
||||
jmp .unkown
|
||||
|
||||
.unkown:
|
||||
@@ -68,14 +79,14 @@ help:
|
||||
call os_print_string_nl
|
||||
call os_read_cli.finish
|
||||
|
||||
cat:
|
||||
call util_cat
|
||||
call os_read_cli.finish
|
||||
|
||||
pong:
|
||||
call game_pong
|
||||
call os_read_cli.finish
|
||||
|
||||
snake:
|
||||
call game_snake
|
||||
call os_read_cli.finish
|
||||
|
||||
section .data
|
||||
welcome_text db 'Welcome to CrawOS, the Cool, Real and AWsome Operating System', 0
|
||||
user_input times 20 db 0
|
||||
@@ -83,8 +94,9 @@ section .data
|
||||
prompt db 'CrawOS sh> ', 0
|
||||
help_string db 'HELP', 0
|
||||
clear_string db 'CLEAR', 0
|
||||
reboot_string db 'REBOOT', 0
|
||||
cat_string db 'CAT', 0
|
||||
pong_string db 'PONG', 0
|
||||
snake_string db 'SNAKE', 0
|
||||
help_text db 'This is for Cowards: "HELP" for this help text, "CLEAR" to clear the screen, esc to reboot', 0
|
||||
help_text db 'This is for Cowards: "HELP" for this help text, "CLEAR" to clear the screen, esc or "REBOOT" to reboot', 0
|
||||
command_result_text db 'You typed: ', 0
|
||||
unknown_command db 'Error: Unkown Command.. ', 0
|
||||
|
||||
Reference in New Issue
Block a user