I just started creating my first operating system, I wanted to start with a very simple bootloader that basically just prints a very simple string. But I can't figure out why, whatever string, the virtual machine (qemu) just prints a 'U'
This is my code:
ORG 0x7c00
BITS 16
%include "lib/print.asm"
boot:
mov si, boot_msg
call Print
jmp $
boot_msg: db "The os is correctly loaded!", 0
times 510 - ($ - $$) db 0
dw 0xAA55
Print function (lib/print.asm):
Print:
mov ah, 0x0e
mov al, [si]
psloop:
int 0x10
inc si
mov al, [si]
cmp al, 0
jne psloop
ret
ret

BHis 0 and ifDS:SIpoints toboot_msgat Print entry. Or load the characters withmov al,[cs:si].