I have created a small boot-able OS in Assembly, with Flat Assembler. I call it PulsarOS. However, I want to create a typing program for it. Like I said, it's all in x86 Assembly. I want it simply to where the user can type, and the typed text is shown on the screen. Here's the code. It boots just fine in VirtualBox and on my physical PC:
mov ax, 9ch
mov ss, ax
mov sp, 4096d
mov ax, 7c0h
mov ds, ax
;Pulsar Micro-Kernel With Text Editor v1.0.1, running Pulsar OS v1.0.4
;_______BOOTED CODE PAST THIS POINT______
mov ah, 09h
mov cx, 80d
mov al, 20h
MOV SI, HelloString
CALL PrintString
mov bl, 80h
int 10h
mov ah, 09h
mov cx, 1000h
mov al, 20h
mov bl, 17h
int 10h
JMP $
PrintCharacter:
mov ah, 0x0E
mov bh, 0x00
INT 0x10
RET
PrintString:
next_character:
MOV AL, [SI]
INC SI
OR AL, AL
JZ exit_function
CALL PrintCharacter
JMP next_character
exit_function:
RET
;In the quotes is the text shown, no ASCII codes here! :)
HelloString db 'PulsarOS Basic Text Editor v1.0.4 ', 0
;When building with cmd prompt, type: copy /b ytut.bin ytut.img
;ytut is the name of the file saved.
;----------------------------------------
times 510-($-$$) db 0
dw 0xAA55
So, it relatively simple, but I want a just-as-simple code I can add into the booted code. I am also pretty new to Assembly, fresh out of my classes, so explain it like I'm five. Thank you!