Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

fig 1 fig 2 A very small program for the LC-3 is shown in Figure 1. This program takes up just nine words of memory,

image text in transcribed

fig 1

image text in transcribed

fig 2

A very small program for the LC-3 is shown in Figure 1. This program takes up just nine words of memory, beginning at x3000. In order to understand what each instruction of this program will do, we need to first view each 4-digit hexadecimal value as a 16-bit quantity This has been done for a few instructions. Check these to test your understanding, then complete the table for the remaining entries. 2. Repeat Exercise 1 for a second LC-3 program, given in Figure 2. 3. If you want to get a head start on the lab, record your answers from the two tables in a README file. You only need to include the first and last columns from each table. 4. With pencil and paper, trace the execution of the second program. What will the values of registers R0 through R5 be when the computer reaches the TRAP instruction?

Address Content Content (binary) Instruction details DR R1 offset x1FD R1 = PC + SEXT(x1FD) setcc) x3001x146E 0001 010 001 1 01110 ADD R2 R1 + SEXT (ZOE) setcc) x3002 x3 5FB x3003 x54A0 x300414A5 x3005x744E x3006xA7F7 x3007x300A x3008xF0251111 0000 0010 0101TRAP halt execution Address Content Content (binary) Instruction details DR R1 offset x1FD R1 = PC + SEXT(x1FD) setcc) x3001x146E 0001 010 001 1 01110 ADD R2 R1 + SEXT (ZOE) setcc) x3002 x3 5FB x3003 x54A0 x300414A5 x3005x744E x3006xA7F7 x3007x300A x3008xF0251111 0000 0010 0101TRAP halt execution

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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_2

Step: 3

blur-text-image_3

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

Excel As Your Database

Authors: Paul Cornell

1st Edition

1590597516, 978-1590597514

More Books

Students explore these related Databases questions

Question

1. What are your creative strengths?

Answered: 3 weeks ago