|
|
|
The assembler keeps track on the amount of memory used for each instruction/variable:
main: add r0, r0, r0 ... L1: add r0, r0, r0 // 4 bytes add r0, r0, r0 // 4 bytes L2: add r0, r0, r0 ... |
The assembler will equate a label with the current memory address when it encounters a label (e.g.: L1:):
Demo program: /home/cs255001/demo/asm/1-directives/labels.s