Q3 Cortex-M0 has sixteen registers. Thirteen are used for general purposes and three are special registers. (a) What are the names of the three special registers? [3] (b) Explain the purpose of each three register. [3] (c) Draw a diagram to explain the link between the special registers when a subroutine is called. [4]
Added by Ann G.
Close
Step 1
We need to identify the three special registers, explain their purposes, and draw a diagram showing their interaction during a subroutine call. Show more…
Show all steps
Your feedback will help us improve your experience
Adi S and 81 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
QUESTION 3 (30 marks) Consider an hypothetical processor having a 16-bit instructions composed of two fields: the first four bits contains the opcode, and the remainder the immediate operand and/or operand address. Assume that the hypothetical machine has the following instructions: 0001 = Load AC from Memory location 0011 = Load AC from I/O 0010 = Store AC to memory location 0101 = Add AC to memory location 1100 = Subtract AC from memory location 1101 = Divide AC with memory location 1110 = Store AC to I/O where AC is accumulator, and I/O is input/output. 3.1) - Write the code (in hexadecimal format) for each of the following instructions: i. Load AC from memory location 941 ii. Add content of memory location 940 iii. Divide by content of location 941 iv. Store AC to device 245. State any assumption that you make, if any. 3.2) - Use the format of Figure 1 to show program execution for the four instructions of above. • A blank chart to be used for this question can be found on the next page of this question paper. • For this question, assume that memory location 940 and 941 to contain 88 and 2 respectively. • You are required to state any assumptions associated with your answer.
Adi S.
Answer the following (2 marks each): a. How many address lines are required to access 4K bytes of program memory in a microcontroller? b. If the number of address lines was 14 address lines, how much memory can the CPU potentially address? c. If the data memory of a microcontroller starts at address 0x20 to 0x4F, how many bytes of memory is this?
Sri K.
Supreeta N.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD