EasyManua.ls Logo

Intel 8253 - Page 343

Intel 8253
773 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...
XA User Guide 2-13 3/24/97
Another version of indirect addressing is called indirect with offset mode. In this version, an
immediate value from the instruction word is added to the contents of the indirect register in
order to form the actual address. This result of the add is 16 bits in size, which is then appended
to the segment register for that pointer register. If the offset calculation overflows 16 bits, the
overflow is ignored, so the indirect reference always remains on the same segment. The
immediate data from the instruction is a signed 8-bit or 16-bit offset. Thus, the range is +127
bytes to -128 bytes for an 8-bit offset, and +32,767 to -32,768 bytes for a 16-bit offset. Note that
since the address calculation is limited to 16-bits, the 16-bit offset mode allows access to an
entire data segment.
When an instruction requires an immediate data value (a value stored within the instruction
itself), it is written using the "#" symbol. For example: "ADD R1, #12" says to add the value 12
to register R1.
Figure 2.9 Basic Indirect Addressing Syntax, to register
Figure 2.10 Basic Indirect Addressing Syntax, from Register
ADD R1, [R2]
R1
R2
register file
data memory
1000
1002
1004
1006
1004
45
1000
Before
R1
R2
register file
data memory
1000
1002
1004
1006
1004
45
1045
After
ADD [R2], R1
R1
R2
register file
data memory
1000
1002
1004
1006
1004
45
1000
Before
R1
R2
register file
data memory
1000
1002
1004
1006
1004
1045
1000
After

Table of Contents