I am following the book Writing a Simple Operating System — from Scratch by Nick Blundell. I am trying to do the task on the page 21. I wrote a simple program to test how initialized data would work in bin files. Here is the program:
hello.asm
section .data
test: db 'A'
section .text
mov ah,0x0e
mov al,[test]
int 0x10
jmp $
times 510-($-$$) db 0
dw 0xaa55
then to compile I do this:
nasm hello.asm -f bin -o hello.bin
to run:
qemu-system-i386 hello.bin
The problem is, the output expected is the character 'A' but what I got is the character 'S'
The output:
I guess that the label test
is not working properly, but I don't know why