Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

3. Consider the C program and simplified memory map for a 16-bit microcontroller shown below. Assume that the stack grows from the top (area

 

3. Consider the C program and simplified memory map for a 16-bit microcontroller shown below. Assume that the stack grows from the top (area D) and that the pro- gram and static variables are stored in the bottom (area C) of the data and program memory region. Also, assume that the entire address space has physical memory associated with it. i #include 2 #define FOO 0x0010 3 4 5 6 7 8 9 10 11 int n; int m; void foo (int a) { if (a > 0) { } 12 13 14 15 16 } n = n + 1; foo (n); } int main() { n = 0; m foo ( *m); printf("%d ", n) ; (int.) FOO; B A data and program memory stack program and static variables memory-mapped I/O interrupt vectors 0xFFFF 0x0020 0x001F 0x0010 0x000F 0x0000 You may assume that in this system, an int is a 16-bit number, that there is no op- erating system and no memory protection, and that the program has been compiled and loaded into area C of the memory. (a) For each of the variables n, m, and a, indicate where in memory (region A, B, C, or D) the variable will be stored. (b) Determine what the program will do if the contents at address 0x0010 is 0 upon entry. (c) Determine what the program will do if the contents of memory location Ox0010 is 1 upon entry.

Step by Step Solution

3.53 Rating (156 Votes )

There are 3 Steps involved in it

Step: 1

Refer the given information in the textbook and assume th... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Multinational Business Finance

Authors: David K. Eiteman, Arthur I. Stonehill, Michael H. Moffett

13th edition

132743469, 978-0132743464

More Books

Students also viewed these General Management questions

Question

3. Explain inductive analysis.

Answered: 1 week ago

Question

1. Describe qualitative research and its assumptions.

Answered: 1 week ago