I\'m needing help with this assignment. I\'m needing it in LC-3 Due: Sunday, Jul
ID: 3913570 • Letter: I
Question
I'm needing help with this assignment. I'm needing it in LC-3
Due: Sunday, July 15, 11:59 PM Write an LC-3 machine language program that counts the number of positive and negative aumers in a sgencoedbegining at ars3200 The last mumber in the sequence is 0. The program's output must be the following 2 lines: Count of negative numbers: n Count of positive numbers: m Where n and m are the number of negative and positive numbers respectively. You can assume that n and m are always less than 10. Make sure that your program is clearly commented. There is no credit for programs that are not commented Save your program with bin extension and submit the file online.Explanation / Answer
ixx a=0;x=0,x; / inititializing a and x xo zexo as xox storing xouxxx / xox(i=-10;i<=0;i++) / xox loop xoxxaixixx xxe xexuexxe from -10 to 0 / {
if(i<0){
a=a+1;
}
x=i-(2*i); ix(x>0) {
b=b+1;
}
}
xxixxx("xoxxixe axe "+a);
printf("negative axe "+b);
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.