Question
Write an assembly language program to do the following, and run it and test it on the lab simulator: Read in integers until a zero
Write an assembly language program to do the following, and run it and test it on the lab simulator:
Read in integers until a zero is read in. Keep a total of both the quantity and the sum of the negative integers and the positive integers. Once a zero is read in (signifying the end of the input) then:
If there were more positive than negative integers, or an equal number, print out a 0 and the sum of the positive integers.
If there were more negative than positive integers, print out a 1 and the sum of the negative integers.
Hand in your answer to this question as
1. A screen shot of the lab assembler program once your program has been assembled successfully, showing that it assembled successfully.
2. A complete separate print-out of your source code with comments, as it may not all be visible in the assembler simulator window.
3. Screen shots of the von Neumann assembler execution window after execution of your program executed with some sample data, for both situations (more negative integers, and more positive integers).
4. The sample data you used to test the program in both situations.
Note that you can resize both windows by "pulling" on the corners until all of your code is visible.
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