Answered step by step
Verified Expert Solution
Question
1 Approved Answer
A program is run in PCSPIM in a single step mode. Program counter starts from 0x00400000, in the next step it advances to 0x00400004, etc,
A program is run in PCSPIM in a single step mode. Program counter starts from 0x00400000, in the next step it advances to 0x00400004, etc, up to 0040002c, as shown below on a partial screen capture of PCSPIM window: Screen capture 1: BadAddr-00000000 PC - 00400020 EPC -00000000 Cause Status - 00000000 HI - 00000000 LO - 00000000 General Registers {to) - 00000000 R16 (50) - 00000000 R24 ( t) - 00000000 RO (0) - 00000000 RB (...etc.) Advancing to the next single step we notice that PC does not continue the previous sequence of addresses, see PC contents below: Screen capture 2: PC -B0000180 EPC - 0040002 Cause BadAddr-00000054 - 00000010 - 00000000 Status -00000000 HI General Registers (0) - 00000000 B (to) - 00000000 R16 (30) - 00000000 R24 ( t) - 00000000 RO (...etc.) We continue single stepping through the program, and eventually notice that PC returns to the original sequencing: Screen capture 3: PC - 00400030 EPC Cause BadAddr-00000054 - 0040002 -00000000 - 00000010 - 00000000 Status - 00000000 HI General Registers (to) - 00000000 R16 (30) - 00000000 RO (0) - 00000000 RS R24 ( t) - 00000000 (...etc.) Answer the following three questions: a. Refer to the screen capture 2. Give previous three values of PC register (as observed during previous single steps), and one next value of PC register (after the next single step is executed). b. Refer to the screen capture 2. Is the next instruction to be executed a part of the user code, or a part of the system (kernel) code? C. Refer to the screen capture 3. When you execute the next step, PC will change We do not know what the program does, so we do not know what will be the next address in PC. What are the possible values in PC in the next step? Describe at least three different cases with a short explanation A program is run in PCSPIM in a single step mode. Program counter starts from 0x00400000, in the next step it advances to 0x00400004, etc, up to 0040002c, as shown below on a partial screen capture of PCSPIM window: Screen capture 1: BadAddr-00000000 PC - 00400020 EPC -00000000 Cause Status - 00000000 HI - 00000000 LO - 00000000 General Registers {to) - 00000000 R16 (50) - 00000000 R24 ( t) - 00000000 RO (0) - 00000000 RB (...etc.) Advancing to the next single step we notice that PC does not continue the previous sequence of addresses, see PC contents below: Screen capture 2: PC -B0000180 EPC - 0040002 Cause BadAddr-00000054 - 00000010 - 00000000 Status -00000000 HI General Registers (0) - 00000000 B (to) - 00000000 R16 (30) - 00000000 R24 ( t) - 00000000 RO (...etc.) We continue single stepping through the program, and eventually notice that PC returns to the original sequencing: Screen capture 3: PC - 00400030 EPC Cause BadAddr-00000054 - 0040002 -00000000 - 00000010 - 00000000 Status - 00000000 HI General Registers (to) - 00000000 R16 (30) - 00000000 RO (0) - 00000000 RS R24 ( t) - 00000000 (...etc.) Answer the following three questions: a. Refer to the screen capture 2. Give previous three values of PC register (as observed during previous single steps), and one next value of PC register (after the next single step is executed). b. Refer to the screen capture 2. Is the next instruction to be executed a part of the user code, or a part of the system (kernel) code? C. Refer to the screen capture 3. When you execute the next step, PC will change We do not know what the program does, so we do not know what will be the next address in PC. What are the possible values in PC in the next step? Describe at least three different cases with a short explanation
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started