next up previous contents index

[ENGN3213 Home]

Position Independent Code

  In some applications it is important that code be relocatable after assembly, for example ROM-based programs. By relocatable we mean that the assembled code can be executed starting at any location in memory. In ROM-based systems, the location of the ROM in the memory space may not be known at the time the program is assembled.

A program is said to be statically position independent if it can be loaded and executed anywhere in memory.

Position independent code may be created using:

These issues will not concern us greatly in this course, but as a digital system designer you need to be aware of the importance of position independence.

The branch instructions BRA, Bcc and DBcc are useful for creating position independent code.


next up previous contents index

[ENGN3213 Home]

ANU Engineering - ENGN3213