Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am trying to figure out why the values for R2-R5 are different in the execution of these two programs. Here is the code I

I am trying to figure out why the values for R2-R5 are different in the execution of these two programs.

image text in transcribed

image text in transcribed

Here is the code I used to generate both programs

code1:

0011000000000000

0010010000000101

0001011010100101

0001100010100110

0001101011000100

0011101000000010

1111000000100101

0000000000000001

0000000000000000

code2:

.orig x3000

LD R2, b101

ADD R3, R2, b0101

ADD R4, R2, b0110

ADD R5, R3, R4

ST R5, b010

HALT

NOP

NOP

.end

a LC3 Simulator code1.obj File Execute Simulate Help IOIJump to: k3000 PC XED79-647 IR xB02C -20436 PSR x8001 -32767 CC P RO X7FFF 32767 R4 x0007 7 R5 x000D 13 R6 x0000 0 R7 xFD75 -651 Rl xFFFF -1 R2 x0001 1 R3 x0006 6 x3000 0010010000000101 x2405 x3001 000101101010010l x16A5 x3002 0001100010100110 x18A6 x3003 0001101011000100 xlAC4 x3004 0011101000000010 x3A02 x3005 1l11000000100101 xF025 x3006 0000000000000001 x0001 x3007 0000000000001101 x000D x3008 0000000000000000 x0000 x3009 0000000000000000 x0000 x300A 0000000000000000 x0000 x300B 0000000000000000 x0000 x300C 0000000000000000 x0000 x300D 0000000000000000 x0000 x300E 0000000000000000 x0000 x300F 0000000000000000 x0000 x3010 0000000000000000 x0000 x3011 0000000000000000 x0000 x3012 0000000000000000 x0000 x3013 0000000000000000 x0000 x3014 0000000000000000 x0000 x3015 0000000000000000 x0000 x3016 0000000000000000 x0000 x3017 0000000000000000 x0000 x3018 0000000000000000 x0000 x3019 0000000000000000 x0000 x301A 0000000000000000 x0000 x301B 0000000000000000 x0000 x301C 0000000000000000 x0000 x301D 0000000000000000 x0000 x301E 0000000000000000 x0000 x301F 0000000000000000 x0000 x3020 0000000000000000 x0000 x3021 0000000000000000 x0000 x3022 0000000000000000 x0000 x3023 0000000000000000 x0000 x3024 0000000000000000 x0000 x3025 0000000000000000 x0000 LD ADD ADD ADD R5, R3, R4 ST TRAP HALT NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP R2, R3, R4, x3006 R2, #5 R2, #6 R5, x3007 code1.obj 53962 instructions executed

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

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

Oracle 10g Database Administrator Implementation And Administration

Authors: Gavin Powell, Carol McCullough Dieter

2nd Edition

1418836656, 9781418836658

Students also viewed these Databases questions