SEMJUL08 - LECT07 - ADDRESSING MODES COMPLETED

SEMJUL08 - LECT07 - ADDRESSING MODES COMPLETED - M68k...

Info iconThis preview shows pages 1–21. Sign up to view the full content.

View Full Document Right Arrow Icon
M68k Addressing Modes ECE 511: Digital System & Microprocessor
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
What we will learn in this session: M68k addressing modes: How to access data: In registers. In memory. Available addressing modes. When to use what.
Background image of page 2
Introduction
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Introduction All CPU instructions have similar requirements: Action - What action should it perform? Source - Where is the data that it is supposed to process? Target - Where should it put the results? Action is done using instructions . Addressing modes identify source and target .
Background image of page 4
Addressing Modes Methods to access data inside: CPU registers. Memory. M68k allows 14 addressing modes : Direct reference. Indirect reference. Addressing modes allow flexible & effective programs design.
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
AM Data Register Direct Address Register Direct Implied Addressing Quick Immediate Data Immediate Data PC with Index PC with Displacement Absolute Long Address Absolute Short Address ARI + Displacement ARI + Index ARI + PostIncrement ARI + Predecrement Address Register Indirect Mem. Addressing Mode Register Addressing Mode
Background image of page 6
Register Addressing Modes
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Register Addressing Modes Modes to access registers in M68k: Address Register. Data Register. Consists of 2 methods: Data Register Direct (DRD). Address Register Direct (ARD).
Background image of page 8
DRD (Data Register Direct) Used to access data registers . Represented to as D n : D represents data register. n is register number. From D 0 to D 7 .
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
DRD Example MOVE.B D0 , D1 ADD.W D4 ,(A0) MULU D5 , D7
Background image of page 10
ARD (Address Register Direct) Used to access address registers . Referred to as A n : A represents address register. n is register number. From A 0 to A 7 . A 7 = stack pointer.
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
ARD Example MOVEA.L A0 , A4 ADDA.W A3 , A6 MOVEA.W #$1234, A2 LEA $1000, A4
Background image of page 12
Memory Addressing Modes
Background image of page 13

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Memory Addressing Modes Modes to access memory locations. 12/14: Memory space is large area. Many varieties of addressing modes. Depends on desired function.
Background image of page 14
ARI (Address Register Indirect) Refers to contents of memory location pointed by A n . Address register enclosed in parenthesis (A n ).
Background image of page 15

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Example: ARI D0 = $12345678 A1 = $007A92 MOVE.B D0, (A1) (This command does not move the data inside D0 into A1, but moves the data inside D0 into the memory location pointed by A1).
Background image of page 16
Example: ARI MOVE.B D1, (A4) Moves a byte from D1 into the memory location specified by A4. ADD.W (A3), D3 Adds the word content of memory address specified by A3 to data register D3.
Background image of page 17

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Example: ARI D0 = $ 12345678 A1 = $00007A92 MOVE.L D0,(A1) $12 $34 $56 $78 $7A90 $7A92 $7A93 $7A94 $7A95 $7A91 D0.L = $12345678 Memory Contents A1 = $007A92 (A1 is still unchanged).
Background image of page 18
Try It Yourself START ORG $1000 MOVE.L #$12345678,D0 LEA $7A92,A1 MOVE.L D0,(A1) END START
Background image of page 19

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
with Post-Increment) Same as ARI, but A n automatically incremented after execution (post- increment). Use the ‘+’ sign after (A
Background image of page 20
Image of page 21
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 81

SEMJUL08 - LECT07 - ADDRESSING MODES COMPLETED - M68k...

This preview shows document pages 1 - 21. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online