This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: When the last integer is input, the program then reads the integer values from the stack (pops) and prints them to the console. You should note that the integers are displayed in reverse order from that entered. This is because the stack is a last-in first-out (LIFO) data structure. For this assignment, modify the program so that instead of handling integers, it works with characters. In other words, accept characters (a, b, c) instead of integers (1, 2, 3). Make all necessary changes to the program so that the characters are correctly read from the console as input, pushed on and popped off the stack, and printed on the console. Turn in: 1. Printed copy of your program. 2. Screen print of the MARS window showing the stack and console. See next page....
View Full Document
- Fall '12
- Console IO Subroutine.asm