Page | 32
Program Counter 27
Accumulator 4
Memory Block Block Content Memory Block Block Content 00 1
30 827 01 31 02 4
32
……
33 25 100 34 26 500 35 27 200 36 28 602 37 29 502 38
Output Stream (after step 13): 1 2 3 4
…… Steps 15 & 16 Program Counter 27
Accumulator 5
Memory Block Block Content Memory Block Block Content 00 1
30 827 01 31 02 5
32
……
33 25 100 34 26 500 35 27 200 36 28 602 37 29 502 38
Output Stream (after step 17): 1 2 3 4 5 The sequence keeps repeating infinitely.
LOCAL LABELS In principle, a label may have any name that obeys the simple syntax rules of the assembler.
In practice, though, label names should be descriptive.
Names such as DATE,MORE,LOSS,RED are preferable to AA.
There are exceptions, however. The use of the non-descriptive label A in the following example
Page | 33
JMP A
DDCT DS 12 reserve 12 locations for array DDCT A . is justified since it is only used to jump over the array DDCT Note that
the arrays name is descriptive, possibly meaning deductions or double-dictionary ) We say
that A is used only locally, to serve a limited purpose.
As a result, many assemblers support a feature called local labels. The main idea is that if a label is used locally and does
not require a descriptive name, why not give it a name that will signify this fact. Names such as H H for the local labels were used. The name of a local label in our examples is a single decimal digit. When such a label is referred to (in
the operand field, the digit is followed by either B or F (for Backward or Forward. LC
13 1:...
17 JMP F jump to 24 24 1:LOD RB B here means address 13 31 ADD RF F is address 102 102 DC 1206,-17 115 SUB RB 102-1=101
Share with your friends: