First page Back Continue Last page Overview Graphics
Laboratory 3.1 : Straight Line
Write and test an assembly language program that solves the following straight-line equation for y. Generate an integer result as close as possible to the actual answer. Assume variable x is always positive.
y = m*x + b
The slope (m) is equal to .68 and the offset (b) is equal to 12. Leave the result (y) in accumulator A. Assume value x is in location Val. Show that the result will always fit in 8 bits.
Test and confirm the program is working properly by testing the following values in Val. Modify Val using the debugger.