x86 NASM 'org' directive meaning

筅森魡賤 提交于 2019-11-29 01:39:32

0000:7C00 is not equivalent to 7C00:0000. The segment part is counted in paragraphs, not bytes. Try this instead:

mov ax, 0x7c0 
mov ds, ax

org defines where the program in question EXPECTS to be loaded into memory. Not where it actually is loaded -- that is controlled by whoever does the loading -- but where it expects to be loaded.

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