Question: Write an LC3 Program to complete the following program. starts at .ORIG x3000 and goes through 10 numbers in an array at memory location at

Write an LC3 Program to complete the following program. starts at .ORIG x3000 and goes through 10 numbers in an array at memory location at x7000 and finds the lowest one and switches it to the first position at location x7000. Thank You.

Write an LC3 Program to complete the following program. starts at .ORIG

What to do: There will be 10 numbers stored contiguously in the computer at location x7000 . Write a complete LC-3 program, starting at location x3000, that will find the location of the smallest number and swap its location with the number in location x7000. For example, Suppose the following numbers are stored at location x7000: x7000 123F x7001 6534 x7002 300F x7003 4005 x7004 3F19 x7005 2DF6 x7006 1200 x7007 0042 x7008 12AA. x7009 54EF x7000 0042 x7001 6534 x7002 300F x7 x7004 3F19 x7005 2DF6 x7006 1200 x7007 123F x7008 12AA. x7009 54EF after the program is run, memory ory 7003 4005 would look like-( Note the smallest element occurred at location x7007: the program swapped the contents of location x7007 with location x7000 You should make NO assumptions about the numbers located at x7000. That is, there may be negative numbers and numbers may repeat

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 Databases Questions!