I know, what this directive is do. As I know program-loader doesn't see this directive, so, how assembler process it?
It sets the current address during assembly to be 100h. That's all it is. A simple assignment.
Elaboration:
The directive does not control where in the result image the following instructions will be placed, but rather where the instructions would be placed after being loaded into memory.
"org <100h>" instructs the compiler with the to-be runtime information to evaluate addresses, as binary image will be loaded with offset (and first 100h bytes possibly to be used for PSP etc. in your context)
This comes in hand to access any data in the same segment (usually when DS=CS, especially true for com files when "you know nothing except your CS"), or when doing a JMP to absolute offset in rare cases.
In other words, it makes all further labels in a segment to account from the specific offset: just that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With