Indirect


In-direction is a programming technique. The concept is based on indirect to the data using the memory addresses that contain them or using pointers pointing to that data or the addresses that contain them.

In the memory not only are stored program data (such as letters, graphic characters, natural numbers, integers, floating point, etc.) but also memory addresses, which are data as well. / p>

For storage and manipulation by the microprocessor, all of this data is nothing more than a sequence of bytes in different cells. Whether a given bit sequence is interpreted as a number or as an address depends on the programmer.

The in-direction mechanism can be chained arbitrarily long. The address containing the address of a data item can be stored in memory again. It is possible to store the addresses in such a way that you have to follow a chain of in-addresses to finally access the data.

In the following example, the "cell" (memory address 0x00000100) contains the data 0x00000200 which in turn represents the address of the new "cell" containing the data corresponding to an address containing a data representing the address 0x00000400 that finally contains the data that interests us. And so we can define at will or convenience the different levels of in-direction that we need.

wiki

Popular Posts