Changes

Jump to: navigation, search

6502 Assembly Language Math Lab

102 bytes added, 08:00, 20 September 2021
Techniques
* Drawing a Line
** To draw a line between two arbitrary points (X<sub>1</sub>,Y<sub>1</sub>)(X<sub>2</sub>,Y<sub>2</sub>) where X<sub>2</sub>-X<sub>1</sub> > Y<sub>2</sub>-Y<sub>1</sub> and all coordinates are positive, calculate the rise/run, then set Y=Y<sub>1</sub> and iterate for X=X<sub>1</sub>:X<sub>2</sub> incrementing Y by the rise/run each step.
** Do something similar with run/rise where X<sub>2</sub>-X<sub>1</sub> < Y<sub>2</sub>-Y<sub>1</sub>
** Suggestion: Use fixed-point math for the rise/run (aka deltaY) value.

Navigation menu