Files
crawos/source/kernel/features/utils.asm
2026-02-09 20:41:49 +00:00

46 lines
679 B
NASM

util_cat:
pusha
call disk_clear_file_buffer
mov si, user_input
; TODO make this more consistent to account for double spaces
add si, 4 ; Move si to after 'CAT'
call disk_load_file
mov si, file_buffer
mov cx, [file_length]
call text_print_raw
popa
ret
util_ls:
pusha
call disk_list_contents
mov si, output_buffer
call os_print_string
call disk_clear_output_buffer
popa
ret
util_basic:
pusha
call disk_load_root
; TODO make this more consistent to account for double spaces
;add si, 3 ; Move si to after 'BAS'
call disk_load_file
mov si, file_buffer
mov ax, si
mov si, 0
call basic_run_basic
popa
ret