47 lines
760 B
NASM

os_start_cli:
pusha
call os_print_newline
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
.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
call os_read_cli.finish
user_input times 20 db 0
prompt db 'CrawOS: ', 0
help_string db 'HELP', 0
help_text db 'This is CrawOS, type "HELP" for help', 0
command_result_text db 'You typed: ', 0
true db 'TRUE', 0
false db 'FALSE', 0