getting input in nasm

closed account (Dy7SLyTq)
so here is the source code for my os:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
BITS 16

start:
    mov ax, 07C0h
    add ax, 288
    mov ss, ax
    mov sp, 4096

    mov ax, 07C0h
    mov ds, ax

    call Terminal

    jmp $

Terminal:
    input resd 1 ; reserved for storing the command
    call Prompt
    call GetCommand
    jmp Terminal

GetCommand:
    int 21h

Prompt:
    mov si, prompt
    call Print
    prompt db "$> ", 0

Print:
    mov ah, 0Eh

.repeat:
    lodsb
    cmp al, 0
    je .done
    int 10h
    jmp .repeat

.done:
    ret

times 510-($-$$) db 0
dw 0xAA55

my problem is, i now want to be able to get a command. i have googled it but im not too sure how to get an unknown number of characters in nasm, only that it seems to require the interrupt 21h
closed account (Dy7SLyTq)
never mind. answered on osdev.
Topic archived. No new replies allowed.