Problem #1: Write an LC-3 ML program to perform the following operations in sequence. Assume that memory address x3010 contains some non-zero integer value. 1. Add +10 to the contents of address x3010 it is odd, and subtract 10 if it is even. 2. If the result is negative, store a -1 in address x3011. Load your program starting at address x3000. Problem #2: Write an LC-3 ML program to perform the following logic: if (M[x3200] > M[x3201]{ M[x3202] = M[x3200] - M[x3201] M[x3201] = M[x3202] * 2 } else { M[x3202] = M[x3201] - M[x3200] M[x3201] = M[x3202] + 10 } Load your program starting at address x3100. You will need to demonstrate the correct execution of your instructions by using the LC-3 Simulator. Make sure you upload your program into Canvas by the deadline.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

For example, instruction like this.

 

0011 0000 0000 0000 ; start at x3000
0001 001 001 1 00000 ;x3000 set N CC if R1 < 0
0000 100 0 0000 0001 ;x3001 if N goto x3003 R2+=5
0000 111 0 0000 0001 ;x3002 Not N goto x3004
0001 010 010 1 00101 ;x3003 R2 += 5
;x3004 done 

Problem #1: VWrite an LC-3 ML program to perform the following operations in sequence. Assume that memory address
x3010 contains some non-zero integer value.
1. Add +10 to the contents of address x3010 it is odd, and subtract 10 if it is even.
2. If the result is negative, store a -1 in address x3011.
Load your program starting at address x3000.
Problem #2: Write an LC-3 ML program to perform the following logic:
if (M[x3200] > M[x3201]{
Мx3202] - M/x3200] - М/x3201]
%3D
M[x3201] = M[x3202] * 2
}
else {
М/x3202] - МIx3201] - М/x3200]
M[x3201] = M[x3202] + 10
}
Load your program starting at address x3100.
You will need to demonstrate the correct execution of your instructions by using the LC-3 Simulator. Make sure you
upload your program into Canvas by the deadline.
Transcribed Image Text:Problem #1: VWrite an LC-3 ML program to perform the following operations in sequence. Assume that memory address x3010 contains some non-zero integer value. 1. Add +10 to the contents of address x3010 it is odd, and subtract 10 if it is even. 2. If the result is negative, store a -1 in address x3011. Load your program starting at address x3000. Problem #2: Write an LC-3 ML program to perform the following logic: if (M[x3200] > M[x3201]{ Мx3202] - M/x3200] - М/x3201] %3D M[x3201] = M[x3202] * 2 } else { М/x3202] - МIx3201] - М/x3200] M[x3201] = M[x3202] + 10 } Load your program starting at address x3100. You will need to demonstrate the correct execution of your instructions by using the LC-3 Simulator. Make sure you upload your program into Canvas by the deadline.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY