Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I have school homework that has to deal with the LC-3 instruction set. I have th

ID: 664311 • Letter: I

Question

I have school homework that has to deal with the LC-3 instruction set. I have this source code:

0011000000000000
0101010010100000
0010011000010000
1111000000100011
0110001011000000
0001100001111100
0000010000001000
1001001001111111
0001001001100001
0001001001000000
0000101000000001
0001010010100001
0001011011100001
0110001011000000
0000111111110110
0010000000000100
0001000000000010
1111000000100001
1111000000100101
0011000100000000
0000000000110000

What it does is it finds and displays the number of times a certain character is found in a string

What i need to do:

A) Modify the machine language program to build a list in memory of the addresses where the ‘p’ matches occur. Start this list of addresses at location x3200.

B) The program output is correct only when the count is a single digit 0... 9. Modify the code to work for any count up to 99 (in addition to saving addresses).

Any help or pointers of how to approach this will be appreciated.. Thanks

Explanation / Answer

0011000000000000

0101001001100000

0101100100100000

0001100100101010

1110010011111100

0110011010000000

0001010010100001

0001001001000011

0001100100111111

0000001111111011

1111000000100101