Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Pep/9 Assembly Language Question: CONTINUED: Consider the following programming assignment. Write a Pep/9 assembly language program that reads positive integers (at least one) then a
Pep/9 Assembly Language Question:
CONTINUED:
Consider the following programming assignment. Write a Pep/9 assembly language program that reads positive integers (at least one) then a negative integer. When the negative integer is read the program outputs the difference between the largest and the smallest positive number. Example input 6293 -1 Expected output 7 A student's solution to this assignment is shown below. Identify the errors Line deci largest,d deci smallest,d top: deci temp,d 4 breq done ldwa largest, d cpwa temp, d brlt skip stwa largest,d skip:ldwa smallest, d 10 cpwa temp, d brgt skip2 stwa smallest,d 12 13 skip2:br top 14done: ldwa largest,d 15 16 suba smallest,d deco largest,d Consider the following programming assignment. Write a Pep/9 assembly language program that reads positive integers (at least one) then a negative integer. When the negative integer is read the program outputs the difference between the largest and the smallest positive number. Example input 6293 -1 Expected output 7 A student's solution to this assignment is shown below. Identify the errors Line deci largest,d deci smallest,d top: deci temp,d 4 breq done ldwa largest, d cpwa temp, d brlt skip stwa largest,d skip:ldwa smallest, d 10 cpwa temp, d brgt skip2 stwa smallest,d 12 13 skip2:br top 14done: ldwa largest,d 15 16 suba smallest,d deco largest,d
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started