SPNU118Z September 1995 – March 2023 66AK2E05 , 66AK2H06 , 66AK2H12 , 66AK2H14 , AM1705 , AM1707 , AM1802 , AM1806 , AM1808 , AM1810 , AM5K2E04 , OMAP-L132 , OMAP-L137 , OMAP-L138 , SM470R1B1M-HT , TMS470R1A288 , TMS470R1A384 , TMS470R1A64 , TMS470R1B1M , TMS470R1B512 , TMS470R1B768
Terminate Local Symbol Block
.newblock
The .newblock directive undefines any local labels currently defined. Local labels, by nature, are temporary; the .newblock directive resets them and terminates their scope.
A local label is a label in the form $n, where n is a single decimal digit, or name?, where name is a legal symbol name. Unlike other labels, local labels are intended to be used locally, and cannot be used in expressions. They can be used only as operands in 8-bit jump instructions. Local labels are not included in the symbol table.
After a local label has been defined and (perhaps) used, you should use the .newblock directive to reset it. The .text, .data, and .sect directives also reset local labels. Local labels that are defined within an include file are not valid outside of the include file.
See Section 4.8.3 for more information on the use of local labels.
This example shows how the local label $1 is declared, reset, and then declared again.
1 00000000 E3510000 LABEL1: CMP r1, #0
2 00000004 2A000001 BCS $1
3 00000008 E2900001 ADDS r0, r0, #1
4 0000000c 21A0F00E MOVCS pc, lr
5 00000010 E4952004 $1: LDR r2, [r5], #4
6 .newblock ; Undefine $1 to use again.
7 00000014 E0911002 ADDS r1, r1, r2
8 00000018 5A000000 BPL $1
9 0000001c E1F01001 MVNS r1, r1
10 00000020 E1A0F00E $1: MOV pc, lr