I'm making a 16-bit real mode operating system and I want to pass commands that the user types in. I can do input but I'm not sure how to store the resulting string so that it can later be parsed. Is there a better way than just putting each character onto the stack and then pop and reverse them when they want to be used?
My main loop:
mainLoop:
mov bx, s_PROMPT
call printStr ; print the 'MOOS> ' prompt
inputLoop:
call getKeyPress ; wait for the user to press a key
call printChar ; print the pressed key so the user can
; see what they've typed
push bl???
cmp bl, 0xD ; 0xD = 13 = ASCII code for enter
jne inputLoop ; go to inputLoop if does not equal enter
call newLine
jmp mainLoop
The operating system is called MOOS by the way.
Thanks to anyone who can help.