68HC11 Addressing Modes
68HC11 Addressing Modes o Aims
To review 68HC11 data transfer instructions and applying the controller addressing modes
o Learning Outcomes
At the end of this module, students should be able to understand • Inherent Addressing Mode
• Immediate Addressing Mode
• Direct Addressing Mode
• Extended Addressing Mode
• Indexed Addressing Mode
• Relative Addressing Mode
20132014-II
2/Module 3
Addressing Modes
20132014-II
3/Module 3
Addressing Modes o The CPU can access data in various ways. The data ways. could be in a register, or in memory, or provided as value. an immediate value. These various ways of accessing data are called addressing modes
o The various addressing modes of a microprocessor are determined when it is designed, and therefore cannot be changed by the programmer
20132014-II
4/Module 3
Inherent Addressing Mode o In this addressing mode all the information required for execution is contained in the instruction o No other operand is required o Examples:
•
•
•
•
•
CLRA
ABA
INCB
INX
TAB
; Clear register A; ACCA ← $00
; ACCA ← ACCA + ACCB
; ACCB ← ACCB + 1
; IX ← IX + 1
; ACCB ← ACCA
20132014-II
5/Module 3
Immediate Addressing Mode o In immediate addressing the instruction itself contains the data to be loaded into the destination o Examples:
•
•
•
•
•
LDAA
ADDA
LDD
LDAB
LDX
#15
#$15
#1000
#’C’
#$1234
20132014-II
6/Module 3
Direct Addressing Mode o In direct addressing the least significant byte of the 16-bit address of the operand is in the instruction o The high order byte is taken to be $00. This is how you access the
256 bytes of RAM. (could also use extended)
20132014-II
7/Module 3
Extended Addressing Mode o In extended addressing the address of the data is a part of the instruction o The address is 16-bit size, thus can access any locations
20132014-II
8/Module 3
Indexed