83
using (a) an operating system ROM routine which converts each 2 byte datum to a floating point number, (b) another ROM routine which creates BASIC floating point variables, and (c) a third ROM routine that sets pointers which equate the variables to the numbers. With all the BASIC variables assigned, the data-in flag is cleared to indicate that the equation variables (or new data) buffer is now free.
The process continues with a routine, EQRUN.MLP, directing calculations using the algebraic equations previously loaded into memory in BASIC "tokenized" form by DSTIM.BAS. A pointer is set to the location of each equation which is then evaluated by a ROM routine. The first four equations, used to calculate the four coordinate values, are in the form of equation (5) in section 2.1.2 and in BASIC nomenclature are
(19) S = (T*T-S*S+P*(S-T))/Q
(20) T = (V*V-U*U+P*(U-V))/Q
(21) U = (Y*Y-Z*Z+P*(Z-Y))/Q
(22) V = (X*X-W*W+P*(W-X))/Q
where the variables S through Z on the right sides of the equations were assigned by VAR.MLP as described above and the variables S, T, U, and V on the left sides of the equations correspond to the coordinates Y1, Xl, Y2, and X2 respectively. As previously described, the multiple use of BASIC variables saves memory and execution time, as does the multiplication of a variable by itself rather than squaring it, and also the use of the variables P and Q rather than
..