Having no luck with data NASM

北战南征 提交于 2021-01-20 12:19:50

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!