简体   繁体   中英

LC3 Concatenate and Compare Strings

I am writing an LC-3 file that should be able to: get the length of a string, copy a string, concatenate two strings, and compare two strings. I believe I have the string length and string copy subroutines done correctly, but the last two are giving me a lot of trouble. I think what I have should work but it is not, I have tried changing things around and testing, but unfortunately nothing I do is working.

I am just going to post my code in a GitHub Gist with comments detailing exactly what I think should happen, if anyone has the time to check it out and offer advice on what is going wrong and how to fix it, I would appreciate.

Wish I had a more specific question to ask but I just have no idea where to go from where I am.

Here is the file: https://gist.github.com/Skipeeto/6179d4c8cf732a72a64b733c3e2a1891#file-string-asm

I did not know GETS was a valid LC-3 macro? If I may ask, what tool are you using to compile and run this code?

Jeff

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM