Desparately need help to solve a prog Question !!
Author Message Desparately need help to solve a prog Question !!

Hi all ASM Gurus out there,

I'm a newbie in ASM, I'm desparately need help to write a ASM
program based on the question  below, it might be simple for gurus,
would appreciate every help to come out this program. Advanced Thanks .

Calvin

Linear Equations :
; ------------------
;Given A,B,C form, find X  intercept, slope and constant
;
;
;For all the following equations, find the X-axis and Y-axis intercepts
and then draw
;the line on the screen. The general form of the equation is Ax + Bx =C
;
;-The equation should be converted to the form y = mx + b as follows.
; By = C - Ax
; multiplying both sides by (1/B)
; y = (Ax/B) + (C/B), so m= -(A/B)  b= (C/B)
;
;-The line should be drawn as a series of points in the graph.
;
;-The line can be approximated as best as possible. Assume that each
vertical line is
; 1 unit and each horizontal dash is one unit.
;
;-Approximately calculate the slope as so many horizontal units then so
many vertical
; units between dots.
;
;-Use a lower case "o" as the points on the line.
;
;-Extend the line at least one point beyond the X-axis and Y-axis. It
can be rough looking,
; but points will be added if it is smoother looking.
;
;-The graph should be between 1/3 and 1/2 of the screen width (20 - 30
`-`s). The optimum
; height you should determine based upon the calculated slope. Note the
maximum height is
; about 40 vertical lines on most monitors, but can be 50 if the mode is

changed.
;
;Program input: A and B and C as data variables initialized to the
correct value.
;
;Program output : "X-axis intercept is x="    {m divided by b}
;  "slope= "{m} and constant b(Y-axis intercept) =" {b}
;
;      Displayed on screen:
;                                                 Y
;                                                  |  o
;                                                 o
o  |
;                                         o       |
;                                    o            |
;                   X------o-----------+----------------
;                           o                     |
;                                                  |
;
;
;LA1 4x - 2y = -8
;LA2 2x + y  = 2
;LA3 10x -2y = 4
;LA4 8x + 2y = 4
;LA5 6x - y = 3
;LA6 x - 2y = 1
;LA7  x + 4y = 2
;LA8 -4x + y = -1
;LA9 -x - y = -3
;LA10 x + 2y = 4
;LA11 2x - y = 8

Thu, 22 Nov 2001 03:00:00 GMT

 Page 1 of 1 [ 1 post ]

Relevant Pages