问题
section .data
map db 1
section .text
start:
cmp byte [map], 1
je exit
jmp start
exit:
ret
I'm having no luck reading data. What I mean is that I assemble to the binary dos COM format and when I start it it just freezes. Can someone tell me what i'm doing wrong?
回答1:
DOS com files are expected to be loaded at address 0x100. You should include line org 0x100
at the start of your code.
来源:https://stackoverflow.com/questions/26424041/having-no-luck-with-data-nasm