Hey,
I have this programming assingment where I have to write a program in C and Assembler. This is for my grade 12 computer engineering class. The program I have to write is "Find the y=mx+b equation that best approximates the line formed by eight points. (x and y are 8-bit values)". I asked the teacher how the program is supposed to work and he said pick random points (make sure they are all above the line of slope of 1) so you do not have to deal with fraction numbers. He said then pick any two points and find the slope between them. Do this for a different set of points a couple of times and u will have different number of slopes. Then what u do is average all the slopes and find the equation of the Trend Line. So basically we have random points on a graph and then we try to find the equation of the trend line. Remember there is no graphing involved and there is no user input he said just store your points in a variable or array. Please help me in writing this porgram. The Assembler part is more important than the C part so i would really appreciate it if some helps me with Assembler.
Thanx
Peace Out