simple OS
fasm boot.asm boot.bin
fasm print.asm print.bin
cat boot.bin print.bin > result.bin
qemu-system-x86_64 -drive format=raw,file=result.bin -nographic
Prints a string to the screen using BIOS interrupt. The string is stored in memory at address si.
Waits for a character input from the keyboard. Once a character is received:
- If it is
Backspace, callsbackspace. - If it is
Enter, callscursor_enter. - Otherwise, the character is displayed on the screen and added to the buffer, then
print_bufferis called.
Displays the first character from the buffer using int 10h.
Deletes the last entered character by moving the cursor back, overwriting it with a space, and shifting the cursor back again.
Moves the cursor to a new line by increasing dh (row number) and setting dl = 0 (beginning of the line).
Displays a welcome message and moves the cursor to a new line.