Question: I am using the LC3 assembler to write two programs taking a user input string of characters, storing it to an array labeled ARRAY, and

I am using the LC3 assembler to write two programs taking a user input string of characters, storing it to an array labeled ARRAY, and then outputting it to the console using PUTS and PUTSP. I have finished the PUTS.asm program, since it only needed to store a single character per 16 bit word to sequential array locations. My issue is figuring out how to store the characters to the array, two characters per 16 bit word, so that I can just call LEA R0, ARRAY and then PUTSP to print out the packed array. My specific question would be: how do I go about packing the array; how do you store two characters per 16 bit word?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!