Linker for the ULM

This session is about organization. Complex programs can be split into separate translation units that can be translated into machine code and using a linker afterwards combined to an executable. This has various advantages, translation units can be used to implement functions that deal with only a specific problems. Therefor the code of each unit is more manageable, it can be used by different programs and can be tested independently.

The following picture illustrates the idea that a function dummy is implemented in a separate unit dummy.s and used by program implemented in main.s:

In the picture you see that another translation unit crt0.s is used for bootstrapping code. In our case it contains code for initializing the stack, calling main and halting the ULM with the return value of main. In general it also contains code for communicating with an operating system.