I need to write a program using lc3 that takes user input and then displays the input forwards, backwards, and then tells you how long the input was. I’m completely stumped on how to do this and have searched everywhere and can’t find anything to help me. I can take the user input but I have no idea how to store it or how to reverse it.
Share
I won’t do your homework for you, but I’ll give you some pointers.
The PDF at http://ftp.csci.csusb.edu/georgiou/lab/lab.pdf has a chapter on working with strings in LC-3. That will show you how to store the string and output it. There are several ways to reverse a string. That PDF shows one way that uses the stack (push and pop instructions).