(作业要求)
INSTRUCTIONS
Write an 8086 assembly program to sort and then compute the Least Median of Squares (LMedS) (which estimates a ‘typical’ data value in a more robust manner than the average) of a set of positive numbers. The numbers will be terminated by -1, and should be stored in your program as:
array DW 101,103,108,102,113,13,109,3,11,9,3,2,7,5,11,13,17,19,7,11,73,79,83,89,-1
These numbers represent pairs of values, where the first element of each pair can be considered the primary key. Sort the pairs into descending order according to the pairs’ first elements. Those pairs with equal primary keys should be further sorted by their secondary key (value). That is, perform as table sort such that the relative order of pairs with equal keys is maintained.
I will modify the array DW statement in your program to use different sets of numbers. Your program needs to work with a variable number of data pairs.
(下面的补充材料中有这里算法的详细解释,不用想的太复杂,按截图解释的写就行)
At each step of the algorithm, output the results, exactly following the output format as shown in the examples on the last page.
IMPORTANT: Your code SHOULD NOT make use of the Kip Irvin Libraries for 8086 Assembly Language that are available on the Internet.
CRITERIA FOR ASSESSMENT
Marking is mostly based on your program’s functionality. The breakdown of marks will be:
•10% – compute number of data pairs
•30% – stable sort numbers
•30% – compute LMedS
•10% – printing results
•20% – in-line comments and coding style
(补充材料)
老师给了一个指定的外部连接库Irvine (见Irvine.zip)
下面是老师演示的配置环境的截图:
这里有问题想问一下:
这个外部库的路径之后改成我自己的电脑上的路径会不会有什么问题?
这里要求只能用这几个函数,用Irvine库里其他的会扣分