Com 212 intro to system programming book Theory



Download 0.65 Mb.
View original pdf
Page27/72
Date13.05.2021
Size0.65 Mb.
#56617
1   ...   23   24   25   26   27   28   29   30   ...   72
com-212-introduction-to-system-programming-theory
9833 SS1 FISHERY LESSON NOTE
Steps 7 & 8
Program Counter 27
Accumulator
3
Memory Block
Block Content
Memory Block
Block Content
00 1
30 827 01 31 02 3
32
……
33 25 100 34 26 500 35 27 200 36 28 602 37 29 502 38
Output Stream (after step 9): 1 2 3

…… Steps 11 & 12



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

Download 0.65 Mb.

Share with your friends:
1   ...   23   24   25   26   27   28   29   30   ...   72




The database is protected by copyright ©ininet.org 2024
send message

    Main page