Up Next
Go up to Top
Go forward to Associating Labels with Procedure Entry Points

How it All Starts

Execution will begin with the first line of code in the assembler file you produce. When this line is executed, the stack pointer will be set but no register will be pre-loaded with the address of the global variable area. To make it possible for you to load this value into a register (probably A5), the assembler puts the address of the first unused word in memory (the word after the last instruction in your code) in word 1 of memory. Thus, the instruction

    MOVE    1,A5
is probably the first line of code your compiler should output on any input program. Assuming you have assigned negative displacement values to global variables, you will then generate an instruction to add the size of the global area to A5.
Computer Science 434
Department of Computer Science
Williams College

Up Next