Epson CMOS 32-Bit Single Chip Microcomputer S1C33L03 Uživatelský manuál Strana 32

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 181
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 31
5 INSTRUCTION SET
24
EPSON
S1C33 FAMILY C33 PE CORE MANUAL
5.5.5 Register Indirect Addressing with Displacement
In this mode, memory is accessed beginning with the address that is derived by adding a specified immediate
(displacement) to the register content. Unless
ext instructions are used, this addressing mode can only be used for
load instructions that have
[%sp+imm6] as the operand.
Examples: ld.b %r0,[%sp+0x10]
The byte data at the address derived by adding 0x10 to the content of the current SP is loaded into the
R0 register. For byte data transfers, the 6-bit immediate is added directly as the displacement.
ld.h %r0,[%sp+0x10]
The halfword data at the address derived by adding 0x20 to the content of the current SP is loaded into
the R0 register. For halfword data transfers, because halfword boundary addresses are accessed, twice
the 6-bit immediate (least significant bit always 0) is the displacement.
ld.w %r0,[%sp+0x10]
The word data at the address derived by adding 0x40 to the content of the current SP is loaded into the
R0 register. For word data transfers, because word boundary addresses are accessed, four times the 6-bit
immediate (2 low-order bits always 0) is the displacement.
If ext instructions described in Section 5.6 are used, ordinary register indirect addressing (
[%rb]) becomes a
special addressing mode in which the immediate specified by the
ext instruction constitutes the displacement.
Example: ext imm13
ld.b %rd,[%rb] The memory address to be accessed is %rb+imm13.
5.5.6 Signed PC Relative Addressing
This addressing mode is used for branch instructions that have a signed 8-bit immediate (sign8) in their operand.
When these instructions are executed, the program branches to the address derived by adding twice the
sign8 value
(halfword boundary) to the current PC.
Example: PC + 0
jrne 0x04 The program branches to the PC + 8 address when the jrne branch
: : condition holds true.
: : (PC + 0) + 0x04
2 PC + 8
PC + 8
Zobrazit stránku 31
1 2 ... 27 28 29 30 31 32 33 34 35 36 37 ... 180 181

Komentáře k této Příručce

Žádné komentáře