Added input ability to BASIC

This commit is contained in:
deadvey
2026-02-09 21:59:35 +00:00
parent e4fc63134f
commit 26ee45eb88
4 changed files with 20 additions and 13 deletions

View File

@@ -13,13 +13,18 @@ os_read_input:
ret
; -------------------------------------------
; IN:
; AX = output address
; BX = max length
os_display_input:
keyboard_display_input:
pusha
mov di, ax
mov ax, bx ; Lazy TODO
mov cx, [prompt_length]
.loop:
call .check_key_pressed
jmp .check_key_pressed
jmp .loop
@@ -49,7 +54,7 @@ os_display_input:
mov al, 0
stosb
popa
call os_read_cli
ret ; Return to the parent function (whatever that may be)
.backspace:
call .move_cursor_back ; then .move_cursor_back
@@ -66,9 +71,9 @@ os_display_input:
int 10h
dec di
jmp os_display_input
jmp keyboard_display_input
.print_current_input:
.print_current_input: ; Echo back that character and return the key inputing
stosb
mov ah, 0Eh