x86 NASM 'org' directive meaning

后端 未结 2 1847
情深已故
情深已故 2020-12-16 00:09

I am following this tutorial as a first foray into bootloader/OS development for x86 using NASM:

http://joelgompert.com/OS/TableOfContents.htm

And I\'m on Le

相关标签:
2条回答
  • 2020-12-16 00:15

    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
    
    0 讨论(0)
  • 2020-12-16 00:21

    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.

    0 讨论(0)
提交回复
热议问题