113D_1_113D_1_10W_EE113D_TAlecture2

113D_1_113D_1_10W_EE113D_TAlecture2 - Memory Architecture:...

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

View Full Document Right Arrow Icon
1 Memory Architecture: Memory Map
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 Algebraic Assembly: Addressing Modes Operands can be addressed in different ways Immediate (#): Use a constant value Direct (@): Access a hardcoded memory location Indirect (*): Access a memory location through a pointer
Background image of page 2
3 Algebraic Assembly: Addressing Modes - Immediate Immediate (#) – use the constant value in the instruction as the operand AR1 = #5 ;AR1 loaded with the value 5; AR 1 = 5
Background image of page 3

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

View Full DocumentRight Arrow Icon
4 Algebraic Assembly: Addressing Modes - Direct Direct (@) – Use the value in the instruction as the address of a memory location Similar to accessing data in an array Address is offset from the data pointer (DP) A = @0x800 ;Accum A loaded with value stored in memory location 0x800; A = mem(0x800) A += @AR1 ;Add contents of AR1 to Accum A; A = A + mem(AR1)
Background image of page 4
5 Algebraic Assembly: Memory-Mapped Registers Registers AR0-AR7 are memory-mapped AR0 is really at memory #0x010h To assign values, @AR0 = #0x001 ;mem(#10h) = 1 AR0 = #0x001 ;AR0 = 1 - Both set the contents of AR0 to 1!
Background image of page 5

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

View Full DocumentRight Arrow Icon
6 Algebraic Assembly: Addressing Modifications Post-increment B = *AR4+ ;B = mem(AR4); AR4++ Pre-increment B = *+AR4 ;++AR4; B = mem(AR4) Pre-increment, post-decrement, no pre-decrement
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 18

113D_1_113D_1_10W_EE113D_TAlecture2 - Memory Architecture:...

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

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