Computer Networking: A Top-Down Approach (7th Edition)
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN: 9780133594140
Author: James Kurose, Keith Ross
Publisher: PEARSON
Bartleby Related Questions 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.
expand button
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
Check Mark
Knowledge Booster
Background pattern image
Similar questions
Recommended textbooks for you
Text book image
Computer Networking: A Top-Down Approach (7th Edi...
Computer Engineering
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:PEARSON
Text book image
Computer Organization and Design MIPS Edition, Fi...
Computer Engineering
ISBN:9780124077263
Author:David A. Patterson, John L. Hennessy
Publisher:Elsevier Science
Text book image
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:9781337569330
Author:Jill West, Tamara Dean, Jean Andrews
Publisher:Cengage Learning
Text book image
Concepts of Database Management
Computer Engineering
ISBN:9781337093422
Author:Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:Cengage Learning
Text book image
Prelude to Programming
Computer Engineering
ISBN:9780133750423
Author:VENIT, Stewart
Publisher:Pearson Education
Text book image
Sc Business Data Communications and Networking, T...
Computer Engineering
ISBN:9781119368830
Author:FITZGERALD
Publisher:WILEY