The Controlling Code,
places the initial value of (2000ho in the Location
counter. As memory is allocated for fields and
instructions, the counter is incremented so that it
always contains the address at the next location avail-
a statement contains a name, that name is
placed in the table, and assigned an address equal to
the current value in the counter.
Consider the following examples:
A 5-byte field
A 2-byte field
A lO-byte Constant
A 6-byte Instruction
A 4-byte Instruction
*Note that the Location Counter is advanced one byte location by the Assembler
to orient the instruction to an even address.
**NO SYMBOL (TAG) ASSIGNED.
IMPLICIT BASE ADDRESS SYSTEM
The User may explicitly state base register values in
his Assembly Statements, or he may ask the Assem-
bler to assign base addresses and compute displace-
ments. This latter method is called the implicit Base
Address System. Base values are considered to be
implied whenever they are not explicitly stated.
Dl (L. B l ). D2 (B 2 )
Explicit Base Addresses
SI (L). S2
Implied Base Addresses
We tell the Assembly what base addresses to use,
for implicit assignment, through a series of Using
Set Location Counter to
in General Register
in Genera) Register
in General Register
With this information, the Assembly selects the base-
address that gives the least displacement, and com-
putes the B1-D1 (or B2- D 2) field in the object instruc-
Assume the two names ABLE and BAKER have been
assigned the addresses 3850(10) and 8173(10) in the
symbol table. The assembly subtracts a smaller
base value from the effective (Symbol Table) Address.
The difference is the displacement.
the displacement exceeds 4095, the statement is
we move ABLE to BAKER the object result is:
Additional rules for implicit aadress generation:
more than one register produces a valid dis-
placement (notover4095(10», the register whose
contents produce the smallest displacement is
If two or more registers produce the same dis-
placement the highest numbered register is used.
If no register produces a valid displacement the
object instruction contains anOP code and zeros.
The statement is flagged.
The UsingStatementis an Assembly Controlling
Code. The User must write additional instruc-
tions and constants to physically load and manip-
ulate register contents.
Address values to be stored in general registers
for base address purposes should be defined with
an address constant controlling code (DC, A
option) • If other means are used, the program
block will not be relocatable. Float factors are
added to address constants, not to the displace-
As mentioned above, a symbol appearing in the NAME
field has an address assigned by the Location Counter.
The aSSignment will be the address of the leftmost
byte of the defined field.
The programmer may reference any location to the
right or left of this address by indicating a plus
or minus (-) value.
As an example, assume a field (WARE) has been
assigned as follows:
1-1_°° __ °1 __