50 lines
770 B
NASM

os_start_cli:
pusha
mov si, prompt
call os_print_string
mov di, user_input
call os_display_input
popa
ret
; ------------------------------------------------
os_read_cli:
pusha
.output_the_user_input:
call os_print_newline
mov si, command_result_text
call os_print_string
mov si, user_input
call os_print_string
call os_print_newline
.check_matches: ; Check if the user input matches any internal commands
mov si, user_input
mov di, help_string
call os_compare_strings
cmp cl, 1
je print_help_text
.finish:
call os_start_cli
print_help_text:
mov si, help_text
call os_print_string_nl
user_input times 20 db 0
prompt db 'CrawOS > ', 0
help_string db 'HELP', 0
help_text db 'This is CrawOS', 0
command_result_text db 'You typed: ', 0