Assembled Numeric Addresses

Why is it not recommended to use numeric addresses when writing instructions for accessing variables? I am learning assembly language, and this question is a question that I came across.

+3
source share
2 answers

Using numeric addresses connects you to specific places in memory. Typically, applications can be downloaded anywhere in memory, so it will not work if it is loaded in a different place than you expected when programming it. Even if you program a kernel of an operating system that lives in low memory, a new version of the kernel may cause the data or code below your address to be larger or smaller, in which case you will have to change all your numeric addresses.

Most processors these days are as fast with indirect addresses as they are with direct addresses, so using numeric addresses doesn't help in any way.

0
source

This will only work for downloaders. You never know what address your code will be uploaded to, even in DOS.

, , (, , ) . .

0

All Articles