This is my source code:
mov byte [gs:0x00],'h'
mov byte [gs:0x01],0x04
mov byte [gs:0x02],'e'
mov byte [gs:0x03],0x04
mov byte [gs:0x04],'l'
mov byte [gs:0x05],0x04
mov byte [gs:0x06],'l'
mov byte [gs:0x07],0x04
mov byte [gs:0x08],'o'
mov byte [gs:0x09],0x04
jmp near $
I put it in MBR.
When I execute this with qemu-system-i386 -m 32 -smp 2 -enable-kvm -hda $(DISK) -nographic
, I cannot find the string printed on the terminal.
But I can find it on Windows using gvncviewer
to see QEMU's window when I start it without -nographic
.
My qemu-system-i386 is version 7.2.0.
Ok, maybe I'm misunderstanding what -nographic
does. Then how do I print text directly on the terminal?