SLAU131Y October 2004 – June 2021
End Assembly
.end
The .end directive is optional and terminates assembly. The assembler ignores any source statements that follow a .end directive. If you use the .end directive, it must be the last source statement of a program.
This directive has the same effect as an end-of-file character. You can use .end when you are debugging and you want to stop assembling at a specific point in your code.
Do not use the .end directive to terminate a macro; use the .endm macro directive instead.
This example shows how the .end directive terminates assembly. Any source statements that follow the .end directive are ignored by the assembler.
Source file:
START: .space 300
TEMP .set 15
.bss LOC1,0x48
LOCL_n .word LOC1
MOV #TEMP,R11
MOV &LOCL_n,R12
MOV 0(R12),R13
.end
.byte 4
.word 0xCCC
Listing file:
1 0000 START: .space 300
2 000F TEMP .set 15
3 0000 .bss LOC1,0x48
4 012c 0000! LOCL_n .word LOC1
5 012e 403B MOV #TEMP,R11
0130 000F
6 0132 421C MOV &LOCL_n,R12
0134 012C!
7 0136 4C1D MOV 0(R12),R13
0138 0000
8 .end