EasyManua.ls Logo

ST ST7 - Advantages of the St7 Instruction Set and Addressing Modes

ST ST7
317 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
82/317
4 - Architecture of the ST7 core
Indexed with indirect short offset mode
This mode is similar to the indirect short mode, in that the address that follows the instruction
is the address of a 8-bit pointer in memory that contains an address. The difference is that this
address is not used right away; it is first added to the contents of the index register, and the
sum is the effective address that will be read or written.
Taking the sameexample as for the indirect short mode, ifthe pointer at address
23h contains
79h, the index register X contains 5, and the byte at address 7Eh contains 0, the instruction
LD A, ([23],X)
A is loaded with the value stored at the address pointed to
by the sum of the 8-bit offset stored at the specified short
address and the contents of the chosen index register. The
range of this mode is 0 to 1FEh.
reads the contents of the address 23h,thatis79h, and adds it to the contents of X,thatis5,
yielding the value
7Eh. This value is taken as the effective address whose contents are read,
giving is zero. The coding of the instruction is (in hexadecimal):
92 E6 23
where the first byte is the PIX prefix. This instruction takes three bytes of memory.
Indexed with indirect long offset mode
This mode takes a 16-bit index in memory, and adds its contents with the 8-bit contents of the
index register, yielding the effective 16-bit address of the operand.
For example, if the 16-bit pointer at address
23h contains 7945h, the index register X contains
5, and the byte at address
794Ah contains 0, the instruction
LD A, ([23.w],X)
A is loaded with the value stored at the address pointed to
by the sum of the 16-bit offset stored at the specified
extended address and the contents of the chosen index
register. Thus, the whole RAM memory space can be addressed.
reads the contents of address 23h, that is 7945h, and adds it to the contents of X,thatis5,
yielding the value
794Ah. This value is taken as the effective address whose contents are
read, giving zero. The coding of the instruction is (in hexadecimal):
92 D6 23
where the first byte is the PIX prefix. This instruction takes three bytes of memory.
4.4 ADVANTAGES OF THE ST7 INSTRUCTION SET AND ADDRESSING MODES
In many programming applications, data may have complex forms. To ease data handling,
high-level languages have been created that simplify coding by allowing expressions like:

Table of Contents

Related product manuals