Question: Flow of Program Execution (10pts) 1. In the class, we explored how a program is executed by using a register file. Fill the blanks to



Flow of Program Execution (10pts) 1. In the class, we explored how a program is executed by using a register file. Fill the blanks to map the location of the specified items. You can fill one of the three locations: storage, memory, register file a. Operands of instructions are maintained in ( -Files are maintained in ( Local and global variables are maintained in ( b. In ARM Cortex-M3 processor, how many general-purpose registers are provided? And what is the size of each register (number of bits)? 3. Show the result of the following operations. Translate hexadecimal numbers into binaries and do the binary level addition and subtraction. Assume that all numbers are 32-bit 2's complement signed numbers a. 0x80123F2F + 0x10300100 b. OxC00100FF 0x40032000 4. Consider the computations of problem 3.a and 3.b above. For each computation, is overflow occurred? a. Answer based on the overflow rule that is explored in the lecture b. Now, let's verify your answer with ARM Kcil debugger. Create an "overflow.s" likc below: 1) Define three word-variables inputl, input2 and output in DATA area Use myData as DATA area's name 2) Assign values used in 3.a and 3.b to variables inputl and input2. Assign0 to output. 3) Define a function_main in CODE area. Use myOverflow as CODE 4) In main function, load values from a and b that are defined in 1) to registers 5) Check add and sub instructions in ARM Keil Assembler User Guide area's name r2 and r2 (http://www.kcil.com/support/man/docs/armasm/armasm dom1361289850039 htm) and find the proper formats of instructions to compute addition and subtraction with condition flags setting. Use the instructions to compute the operations of 3.a and 3.b. Store the computation result to r3 6) Store the value of r3 to the variable output Run Debug Session (as directed in the installation guide). Answer if overflow is occurred for each of3.a and 3.b by explaining how you observed the overflow from the debugger (e.g., which bit of what register you've checked) . Check points: We will evaluate your code by checking the following items Usage of CODE and DATA area names as specified in the description Usage of variable and register names as specified in the description Correct usage of memory operations, load and store (Don't forget to store back the result to the variable output) Correct usage of add and sub instructions (Beware, you should find the proper type of add and sub instructions to check overflow) Correct code structure/grammar (c.g., indentations) Your code must be at least compilable and executable
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
