Question

Embedded System.. 1. Analyze the instruction sets below. LDR R1, [R0, #0x08] SUB R1, R1, R2,...

Embedded System..


1. Analyze the instruction sets below.

LDR R1, [R0, #0x08]

SUB R1, R1, R2, LSR R3

LDR R1,[R0,R2,LSL#2]!

LDR R1, [R0],R2, LSL #1

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Memory: Think of as single one-dimensional array where each cell v Stores a byte size value v Is referred to by a 32 bit address e.g. value at 0x4000 is 0x0a vData is stored in memory as: variables, arrays, structures vBut ARM arithmetic instructions only operate on registers, never directly on memory. vData transfer instructions transfer data between registers and memory: vMemory to register or LOAD from memory to register vRegister to memory or STORE from register to memory

Add a comment
Know the answer?
Add Answer to:
Embedded System.. 1. Analyze the instruction sets below. LDR R1, [R0, #0x08] SUB R1, R1, R2,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Consider the following operations: A B- C The corresponding assembly code instruction list generated by a compiler are 1 load [%r0 +4], %r1 2 load [%r0 + 8], %r2 3 sub %r1, %r2,%r3 4 load [ZrO + 1...

    Consider the following operations: A B- C The corresponding assembly code instruction list generated by a compiler are 1 load [%r0 +4], %r1 2 load [%r0 + 8], %r2 3 sub %r1, %r2,%r3 4 load [ZrO + 12], %r4 5 add %r3, %r4 , %r5 6 store %r3, [%r0 + 16] 7 store %r5, [%r0 + 20] a) Identify the potential pipeline hazards. (10 points) b) State if the found hazards can be eliminated and if so propose a scheme...

  • 2. Encode the following four TM4C Thumb-2 instructions using 16-bit instructions if possible: LDR R3,[R0] MOV...

    2. Encode the following four TM4C Thumb-2 instructions using 16-bit instructions if possible: LDR R3,[R0] MOV R2,R3 STR R6, [SP, #0x08] RSB R11,R7,R7, LSL #2 Note: uVision may NOT give the 16-bit answer for encoding when you check.

  • Modify the ARMSIM program to do the following: 1) output the square sum of the data...

    Modify the ARMSIM program to do the following: 1) output the square sum of the data 2) output the sum of all negatives and positives separately    .text @ Direvtive     .global _start @ declare global begining    _start: LDR R1,=idx @ content of idx is length of Vec and now R1 is a counter. LDR R1,[R1] @ R1 is now the length of Vec. read inderectly LDR R2,=Vec @ R2 is the address of first element of vector MOV...

  • 3) (5) What value will the carry flag contain after these instructions: a) MOV R1,#3 MOVS...

    3) (5) What value will the carry flag contain after these instructions: a) MOV R1,#3 MOVS R2, R1, LSR #1 b) MOV R1,#2 MOVS R2, R1, LSR #1 4) (5) Will this instruction update the flags in the CPSR? ADD R1, R0, #1 Alo it Why or why not?

  • Problem: On an ARM processor using big endian format, given the following memory map and [R1]...

    Problem: On an ARM processor using big endian format, given the following memory map and [R1] = 0xA10E0C2D, [R2] = 0x00000060, [R3] = 0x00000002, [R4] = 0x0000000C, predict [R1] and [R2] and draw the updated memory map after an ARM data transfer instruction is executed in EACH case. (hint: (1) in this map, each memory location is a word long and occupies 4 bytes; also you only need to draw the section of the memory including the changed word and...

  • ; assumed A is in r0, B is in r1, ? is in r2, D is...

    ; assumed A is in r0, B is in r1, ? is in r2, D is in r3 : increment is put into r4, carry2 into r5, low into r6 and high into r MOV r4, #0 MOV r5, r4 ADDS r6, r1, r3 BCC no incr MOV r4,#1 ; initialise incremen t 0 ; initialise carry2 ; low=B+D ; skip if not over 32-bits ; set increment 1 ; high:: A+C ; skip if not over 32-bits no-incr ADDS...

  • Assembly lang multiple choice Suppose we have the following pseudo-instruction in our program: push {r0, r2,...

    Assembly lang multiple choice Suppose we have the following pseudo-instruction in our program: push {r0, r2, r4} ..... Which of the following instructions would be the appropriate instruction to use when cleaning up the stack space used by the three register values that were pushed onto the stack? Group of answer choices sub sp, #12 add sp, #12 add lr, #12 2) Suppose we are comparing registers R1 and R2 and we want to branch if equal to the label...

  • (1) Having the following sets: [2 marks] P: P1, P2, P3 R: R1, R2, R3 E:...

    (1) Having the following sets: [2 marks] P: P1, P2, P3 R: R1, R2, R3 E: P1→R2, P2→R1 R1→P1, R2→P2, R3→P3 Draw the resource allocation graph of the previous system? Examine if the system deadlocked or not and list all the cycles?

  • Section B - ARM Assembly Language (25 marks) An ARM instruction set summary is provided at...

    Section B - ARM Assembly Language (25 marks) An ARM instruction set summary is provided at the end of this paper 1. (5 marks) Consider the following assembly instruction STMFD r13!, (r5-6} Before executing this instruction, registers hold the following values: Register Value Register r9 Value r4 0x00400040 0x00000000 r5 r10 0x11223344 0x00800080 r6 0x55667788 r11 0x10001000 r7 0x99aabbcc r12 0x20002000 r8 exddeeff00 r13 ex40004000 What memory locations are affected after executing the above instruction? In a table, with a...

  • Assignment 4: Answer the following questions with reference to the assembly program below. Before the code...

    Assignment 4: Answer the following questions with reference to the assembly program below. Before the code is executed, the initial content of memory and registers is shown in the figure below memory 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 address Use BIG ENDIAN, and 0x2000.0000 0x2000.0001 0x2000.0002 show all steps register 0x2000.0000RO Ox2000.0003 0x2000.0004 0x2000.0005 0xFFFF.FFFF R2 ox2000.0006 0x1234.5678 R3 0x2000.0007 Ox0000.0000 R1 LDRH R1, [R0 , #2]! LDRH R2 , [R0 , #2)! ADD R3, R1, R2 STR...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT