Question: Write a program in a lc-3 simulator use assembly language: the program should accept an ascii character string, terminated by a carriage return. Echo the
Write a program in a lc-3 simulator use assembly language:
the program should accept an ascii character string, terminated by a carriage return. Echo the characters as they are typed in, then, on a new line, print out the string in reverse. Implement your program using a stack, by writing Push and Pop subroutines and calling them to do the work. The test string will not be longer than 40 characters. You do not need to handle a stack overflow condition.
Sample input: Reverse This String...
Desired Output: ...gnirtS sihT esreveR
If user tries to enter more than 40 characters, stack overflow is detected by the PUSH subroutine and the message "stack overflow" is displayed after echoing the 40 characters entered before the stack overflow event.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
