What does ORG Assembly Instruction do?

前端 未结 5 1385
花落未央
花落未央 2021-02-01 01:12

can anyone give me a comprehensive description about ORG directive?
When and why is it used in assembly written applications?

Using Nasm on x86 or AMD64.

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-01 01:36

    ORG is merely an indication on where to put the next piece of code/data, related to the current segment.

    It is of no use to use it for fixed addresses, for the eventual address depends on the segment which is not known at assembly time.

提交回复
热议问题