Starting writing an ed implementation

This commit is contained in:
deadvey
2026-03-07 20:48:34 +00:00
parent 43d0a020f7
commit 7a9b82d57c
12 changed files with 126 additions and 83 deletions

View File

@@ -1,30 +1,30 @@
util_cat:
pusha
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_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
call disk_load_file
mov si, file_buffer
mov cx, [file_length]
call text_print_raw
popa
ret
popa
ret
util_ls:
pusha
pusha
call disk_list_contents
call disk_list_contents
mov si, output_buffer
call os_print_string
call disk_clear_output_buffer
mov si, output_buffer
call os_print_string
call disk_clear_output_buffer
popa
ret
popa
ret
util_basic:
pusha
@@ -43,3 +43,13 @@ util_basic:
popa
ret
util_ed:
pusha
call disk_load_root
call disk_load_file
call ed
popa
ret