Question

Question 2 ARM Assembly Language (25 marks) An ARM instruction set summary is provided at the end of this paper. (5 marks) Ex

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

) Dfference bctucen eor & eons - iCal Exclusive OR T Perfoms Eo Eon means XoR oPeation. eons aso used to Perfosm hgical Encln oes Coneuts n to 1 oad 1, with a7 Conteuts u loads a wth *1+4Coreu Sta 12 cmP 1Compares 2 213 Canay lag s sct CS Conteuts f

Add a comment
Know the answer?
Add Answer to:
Question 2 ARM Assembly Language (25 marks) An ARM instruction set summary is provided at the...
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...

  • Write an equivalent C function and explain what it computes. 3. (10 marks) The following is...

    Write an equivalent C function and explain what it computes. 3. (10 marks) The following is the assembly language translation of a C function mystery: r3, [r0, #0] r3, #0 L3 ldrb cmp beq r3, #0 mov L4: r3, r3, #1 r2, [ro, r3] r2, #0 L4 add ldrb cmp bne .L3: ro, r3 lr mov bx Annotate each line of the function with commentss to explain what each line does. Write an equivalent C function and explain what it...

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

  • Exercise 2 (4 pts) Here is a logical instruction that is not included in the ARM...

    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 don't we use the instruction MOV?

  • This code needs to be written in Assembly language using Keil uvision 5. Please use Keil...

    This code needs to be written in Assembly language using Keil uvision 5. Please use Keil Assembler. Or ARM assembly. Thanks. int main(void) { // initializing int R0 = 5; int R1 = 10; // for loop addition with CMP while(RO <=| 10) R$++; // for loop subtraction without CMP#10 while(R1 > 0) R1--; // if else statement if (RO > 0) R0 = 10; R1 = 10; else | R0 = 20; R1 = 30; // must using branching...

  • 1. The following instruction(s),--, is (are) ARM® Cortex®-M4 assembly instructions. a. ui32int uiLoop c. void_WFI(void)...

    1. The following instruction(s),--, is (are) ARM® Cortex®-M4 assembly instructions. a. ui32int uiLoop c. void_WFI(void); d. WFI 2. The ARM® Cortex-M4 assembly instructions contain. a. Label field b. Operation field and operands field c. Operation field, op erands field and comment field d. Both a and c Copyrighted material Homework 245 3. The pseudo instruction DCW 2 is to a. Reserve 2-byte space for a data item in the program b. Reserve 2 hal f-word space for a data item...

  • Could you please help me doing this? Slide #14: Slide #15 The question: ARM Assembly Language...

    Could you please help me doing this? Slide #14: Slide #15 The question: ARM Assembly Language label mnemonic operand1, operand2, operand3 comments R2+R1->R3 Loc ADD R3, R2 R1 Label is a symbolic reference to this instruction's address in memory. Mnemonic represents the operation to be performed .The number of operands varies, depending on each specific instruction. Some instructions have no operands at all. operand1 is typically the destination register, and operand2 and operand3 are source operands. operand2 is usually a...

  • Assembly code time

    Consider the following assembly language code:I0: add $R4,$R1,$R0                             //ADD R4 = R1 + R0;I1: lw $R1,100($R3)                             //LDW R1 = MEM[R3 + 100];I2: lw $R9,4,($R1)                                // LDW R9 = MEM[R1 + 4];I3: add $R3,$R4,$R9                             //ADD R3 = R4 + R9;I4: lw $R1,0($R3)                                 //LDW R1 = MEM[R3 + 0];I5: sub $R3,$R1,$R4                             //SUB R3 = R1 - R4;I6: and $R9,$R9,$R7                             //AND R9 = R9 & R7;I7: sw $R2,100($R4)                             //STW MEM[R4 + 100] = R2;I8: and $R4,$R2,$R1                             //AND R4 = R2 & R1;I9: add...

  • A C program has been compiled into the Atmel AVR assembly language. The following instruction, which...

    A C program has been compiled into the Atmel AVR assembly language. The following instruction, which is located at address 0x002A, is executed: i.) What is the binary value contained in the instruction register (IR) when the instruction is executed? ii.) What is the hexadecimal value of the program counter (PC) when the instruction is executed? iii.) If register r1 = 0x40 and register r2 = 0x02 prior to executing the instruction, what are the contents of r1 and r2...

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

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