EEE-G512-15_LDMA_SWI_ASSEMBLY - Embedded System Design (EEE...

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

View Full Document Right Arrow Icon
Embedded System Design (EEE G512) Second Semester 2009-2010 Lecture- 15 Rajiv Ranjan Singh Lecturer, EEE Group Birla Institute of Technology and Science, Pilani, (India) Email: [email protected] Course - Home: http://discovery.bits- pilani.ac.in/discipline/eee/rrsingh/ESD-Home-On- Campus.htm Embedded System Design (EEE G512), © 2010, Rajiv Ranjan Singh, BITS Pilani, India
Background image of page 1

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

View Full DocumentRight Arrow Icon
Outline (Lecture-15) b ARM Assembly Programming b Addressing Modes and Instruction Set Overview Embedded System Design (EEE G512), © 2010, Rajiv Ranjan Singh, BITS Pilani, India
Background image of page 2
Load and Store Instructions Stack Operations: b POP => load multiple instruction b PUSH => store multiple instruction b Ascending stack => grow towards higher memory addresses b Descending stack => grow towards lower memory addresses b Full stack => SP points to the last location on stack Embedded System Design (EEE G512), © 2010, Rajiv Ranjan Singh, BITS Pilani, India b Empty stack => SP points after the last location on the stack Addr. mode Description POP = LDM PUSH = STM FA Full ascending LDMFA LDMDA STMFA STMIB FD Full descending LDMFD LDMIA STMFD STMDB EA Empty ascending LDMEA LDMDB STMEA STMIA ED Empty descending LDMED LDMIB STMED STMDA
Background image of page 3

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

View Full DocumentRight Arrow Icon
Load and Store Instructions Stack Operations Example: BEFORE STMFD sp ! , {r2,r5} AFTER r2=0x00000003 r5=0x00000004 sp=0x00060012 r2=0x00000003 r5=0x00000004 sp=0x0006000A Embedded System Design (EEE G512), © 2010, Rajiv Ranjan Singh, BITS Pilani, India 0x60016 0x00000001 0x60012 0x00000002 0x6000E Empty 0x6000A Empty 0x60016 0x00000001 0x60012 0x00000002 0x6000E 0x00000004 0x6000A 0x00000003 sp sp stmfd => full stack push operation (descending stack) Sp points to the last full entry in the stack Note: STMFD sp!, {r2,r5} = STMDB r13, {r2,r5}
Background image of page 4
Load and Store Instructions Stack Operations Example: BEFORE STMED sp ! , {r2,r5} AFTER r2=0x00000003 r5=0x00000004 sp=0x0006000E r2=0x00000003 r5=0x00000004 sp=0x00060006 Embedded System Design (EEE G512), © 2010, Rajiv Ranjan Singh, BITS Pilani, India 0x60016 0x00000001 0x60012 0x00000002 0x6000E Empty 0x6000A Empty 0x60006 Empty 0x60016 0x00000001 0x60012 0x00000002 0x6000E 0x00000004 0x6000A 0x00000003 0x60006 Empty
Background image of page 5

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

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/08/2010 for the course EEE EEE-G512 taught by Professor Rajuranjansingh during the Spring '10 term at Birla Institute of Technology & Science.

Page1 / 15

EEE-G512-15_LDMA_SWI_ASSEMBLY - Embedded System Design (EEE...

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

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