Added input ability to BASIC
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user