© 1985 ASCII CORP. / NIPPON GAKKI CO.
Page 85 of 108
© 2010-2015 Eugeny Brychkov
4.4.9. LINE
LINE command is used to draw straight line in VRAM of expansion RAM. The line
drawn is the hypotenuse of the triangle defined by the “long” and “short” sides. The
distances are defined from the single starting point. Words “long” and “short” are used to
identify respective sets of registers to use to define triangle’s sides: long side is defined in
registers R#40 and R#41 (by 10 bits MJ9…MJ0 with value in the range 0…1023) and short
side is defined in registers R#42 and R#43 (by 9 bits MI8…MI0 with value in the range
0…511). The units used are dots.
Video or expansion RAM
↑
DIY
Min
(DX, DY)
Maj
→
DIX
LINE execution order
Step 1: Set necessary coordinates in command registers
MSB
7 6 5 4 3 2 1 0
LSB
R#36
DX7 DX6 DX5 DX4 DX3 DX2 DX1 DX0
R#37
0 0 0 0 0 0 0
DX8
DX: Starting
point X
R#38
DY7 DY6 DY5 DY4 DY3 DY2 DY1 DY0
R#39
0 0 0 0 0 0
DY9
DY8
DY: Starting
point Y
R#40
NX7 NX6 NX5 NX4 NX3 NX2 NX1 NX0
R#41
0 0 0 0 0 0 0
NX8
Maj (NX): long
side dots num
R#42
NY7 NY6 NY5 NY4 NY3 NY2 NY1 NY0
R#43
0 0 0 0 0 0
NY9
NY8
Min (NY): short
side dots num