I've been able to set the video mode to 3 (although qemu already sets it to 3 already), and then print 'A' at the first character of the first line on the screen by directly changing video memory.
Code: Select all
[org 0x7C00] ;Address BIOS loads the bootloader into
[bits 16]
;Set video mode to mode 3
mov ah, 0x03
mov al, 0x00
int 0x10
mov ax, 0xB800
mov es, ax
mov bx, 0
mov [es:bx], byte 65
mov [es:bx+1], byte 0x0F
;cli
JMP $ ;Infinite loop, hang it here.
times 510 - ($ - $$) db 0 ;Fill the rest of sector with 0
dw 0xAA55 ;Add boot signature at the end of bootloader
Oh and for what it's worth, the commands I use to run the bootloader
Code: Select all
nasm -o bl.bin bl.asm
qemu -fda bl.bin