Question

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

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

1))option a -There is no instruction in ARM of form of option a

FOR option b cannot be correct as ARM instructions cannot be of that form.

FOR option c and d

WFI (wait for interrupt) IS FOR ENTERING EITHER STANDBY OR SHUTDOWN MODE WHERE AN INTERRUPT IS REQUIRED TO WAKEUP THE PROCESSOR.

Even void _WFI(void) is used to enter low power state.

So C and D are correct.

So answers are C,D.

2))ARM instruction set has is load/store architecture.

It has LABEL,OPCODE,OPERANDS,COMMENTS.

LABEL-optional and used to define starting location of block of statements.

OPCODE-is the seconf field and used to tell which operation to peform on operands.

OPERANDS-number of operands varies from 0 to 4 in ARM Architecture.

COMMENTS-messages for human consumption.

so option D is correct.

3)) DCW(DEFINE CONSTANT WORD) is a data reservation directive which allocates one or more half words of memory,aligned on two-byte boundaries.

here DCW 2 is used to reserve 2-half word space.

Therefore option B is right.

4))LDRB-(load register byte)

[r2,#0x5] tells to add value in r2 and 0x5 and value at that address is loaded into r0.

Adding r2=0x40004000 and 0x5 gives 0x40004005.

So option C is correct.

5))BFC(Bit Field Clear) is used to reset bits to zero.

Also BFC R4,#y,#x where y is start,x is number of bits to reset.

Here start from 8 and then 8+12-1=19 .

So option D is right.

Add a comment
Know the answer?
Add Answer to:
1. The following instruction(s),--, is (are) ARM® Cortex®-M4 assembly instructions. a. ui32int uiLoop c. void_WFI(void)...
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
  • Question 3: ARM Processor a) What is the number of bits in a general-purpose register (e.g., R1) of the ARM Cortex-M4 processor (CPU)? b) What is the number of bits in a memory address for the ARM pr...

    Question 3: ARM Processor a) What is the number of bits in a general-purpose register (e.g., R1) of the ARM Cortex-M4 processor (CPU)? b) What is the number of bits in a memory address for the ARM processor architecture? c) What is the number of bits in an assembly instruction for the ARM Thumb-2 instruction set? d) Consider the memory map used with the TM4C123 microcontroller shown below. If the stack is in data memory, what is the initial address...

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

  • 1. Translate the following tasks into a single ARM instruction: a. Add 32 times of the...

    1. Translate the following tasks into a single ARM instruction: a. Add 32 times of the content of registers r0 and the content of r1 only if N is clear. Store the result in register r2 b. Subtract the content of register r0 from 0x990 and put the results in register r3 only if C is set and Z is clear. c. Clear the 2nd least significant byte of the content of register r1, i.e., store (00000000)2 in it, and...

  • Note: All assembly code should be well commented-similar level of detail to samples. 7. Write ARM...

    Note: All assembly code should be well commented-similar level of detail to samples. 7. Write ARM code that decodes the immediate value in an instruction-takes the last 12 bits and turns it into the value it represents a. Start by loading r1 with the value E3A01CFA (machine code for a move immediate into register) b. Isolate bits 0-7 (the rightmost 8 bits) the 8-bit binary number - into r2 c. Isolate bits 8-11 d. Multiply r3 by 2 to get...

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

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

  • Implement the following statements using MS430 assembly instructions. You may use more than one, ...

    Implement the following statements using MS430 assembly instructions. You may use more than one, but you should minimize the number of instructions required. You can use both native and emulated instructions. Use hex notation for all numbers 1. (a) Move the word located in register R14 to R15 (b) Increment the word in R6 by 2. (c) Perform a bitwise ANDing of the word located at address 0x0240 with the datum in R15, placing the results in R15. (d) Rotate...

  • Problem 5 (15pts): Describe what the following program is doing (Do not need to explain each line of instruction....

    Problem 5 (15pts): Describe what the following program is doing (Do not need to explain each line of instruction. Just show me the purpose of this code). .equ LEDS, Ox100000 10 # define LEDS Ox10000010 .text global start #base address of LEDS on DEO-Nano start: movia r2, LEDS movi r3, 0b00000001 movi r4, OX7FFF slli r4, r4, 3 add r4, r4, r4 load: movi r5, 0b10000000 loop: stw rs, o(r2) mov r6, ro count: addi r6, r6, 1 bne r6,...

  • Exercise 1. What is the size of the memory for the microprocessor if it has 24-bit...

    Exercise 1. What is the size of the memory for the microprocessor if it has 24-bit address lines (bus)? Furthermore, give the starting address and the last address of the memory. 2. List the operation modes of the ARM Cortex-M3. 3. What is the function of register R13? Register R14? Register R15? 4. On an ARM Cortex-M3, in any given mode, how many registers does a programmer see at one time? 5. Which bits of the ARM Cortex-M3 status registers...

  • Convert the following assembly language program into a C program: *Update: The variables are initialized, in...

    Convert the following assembly language program into a C program: *Update: The variables are initialized, in lines 4 & 6 of the red assembly language code. Convert the following assembly language program into a C program: *Update: The variables are initialized, in lines 4 & 6 of the red assembly language code. include "p24Hxxxx.inc" global__reset bss: Uninitialized data section: Variables start at location 0x0800 x: .space 2: Allocating space (two bytes) to variable. y: .space 2;Allocating space (two bytes) to...

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