Question

Exercise 2 (4 pts) Here is a logical instruction that is not included in the ARM instruction set. ANDN rl, r2, r3 @bit-wise AND of r2 and Ir3 (r2 and not r3) (2 pts) Provide a minimal set of ARM instructions that may be used in place of ANDN. 1ldr r2,0x0OFFASA5 2 ldr r3,OxFFFF003C 4 (2 pts) The above snippet starts with loading registers r2 and r3 with some values using instruction LDR. Why dont we use the instruction MOV?
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Rest of the instructions will be

Mvn r1,r3

and r1,r1,r3

Q2

The values might be present in the memory

Add a comment
Know the answer?
Add Answer to:
Exercise 2 (4 pts) Here is a logical instruction that is not included in the ARM...
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
  • 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...

  • Exercise 1 (9 pts) We have seen that ARM has 16*32 bits registers (plus floating point...

    Exercise 1 (9 pts) We have seen that ARM has 16*32 bits registers (plus floating point registers) There is also a status register: CPSR. It contains, among other things, the following important status bits N Negative, set when the result of an arithmetic operation is negative (according to the two's complement encoding of the natural numbers . Z- Zero, set when the result of an operation is zero . C Carry, set when an operation results in a carry bit...

  • Question 2 ARM Assembly Language (25 marks) An ARM instruction set summary is provided at the...

    Question 2 ARM Assembly Language (25 marks) An ARM instruction set summary is provided at the end of this paper. (5 marks) Explain the difference between eor and eors instruction. Use an example to show why both forms are useful. а. b. (5 marks) Explain using an example what the "Idr r3, [r7,#4]" instruction does. c. (10 marks) The following is the assembly language generated by a C compile type mystery, %function mystery: args 0, pretend = 0, frame =...

  • 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...

  • 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...

  • 13) (4 pts) Squaring a number is useful in many other algorithms. This assembly routine calculates...

    13) (4 pts) Squaring a number is useful in many other algorithms. This assembly routine calculates the square of an unsigned integer. How long does this take in clock cycles (worst case). Assume ARM 32 bit instruction set and the integer is in R0 before we begin. AREA L.textl, CODE, READONLY PROC EXPORT square square MOV R1,RO; CMP R1, #0 ANDS R3,RO,R1 BNE skip ADD RO,R1, LSL R3; MOV R2,R2, LSL #1 CMP R2, #0 BNE loop BX LR loop...

  • Suppose that we wanted to take the VBC1 instruction set and add 2 new commands for accessing the memory READ DR, Address and WRITE DR, Addres:s Because of this we also decide to add to additional reg...

    Suppose that we wanted to take the VBC1 instruction set and add 2 new commands for accessing the memory READ DR, Address and WRITE DR, Addres:s Because of this we also decide to add to additional registers to support memory access. Theses registers are designated R2 and R3 How does this impact the machine language for the VBC1 Please do not discuss changes to the hardware Machine Language Instructions in Assembly Language Form (ALF)e Data/ Address SR Opcode DR 4...

  • Part 2 (22 pts) .ORIG x3000 LEA R1, STRZ AND R2, R2, #0 LD R4, CHAR...

    Part 2 (22 pts) .ORIG x3000 LEA R1, STRZ AND R2, R2, #0 LD R4, CHAR REPEAT LDR R3, R1, #0 BRz FINISH   ;Branch to FINISH if the value of R3 is zero ADD R3, R3, R4 BRnp PASS   ;Branch to PASS if the value of R3 is positive or negative ADD R2, R2, #1 PASS ADD R1, R1, #1 BR REPEAT   ;Branch always to REPEAT FINISH ST R2, COUNT HALT CHAR .FILL xFF91 COUNT .FILL x0000 STRZ .STRINGZ "Hello...

  • 1.) a.) Using the simplified instruction set shown for part b, write code for the following....

    1.) a.) Using the simplified instruction set shown for part b, write code for the following. Suppose memory locations 1400 to 1449 contain 16-bit words. Each word represents 2 ASCII characters. Write code to read in and write out these 100 characters. Left-side character from location 1400 should be first, right-side character from location 1400 should be second, and remaining characters follow in numeric order. Assume you have access to 4 registers: R1, R2, R3, R4. Each register holds one...

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
ADVERTISEMENT