dos33fsprogs/graphics/hgr/vgi/vgi_lines.s

75 lines
914 B
ArmAsm
Raw Normal View History

2021-06-18 19:56:51 +00:00
; VGI Lines
;========================
; VGI point
;========================
2021-06-25 13:47:33 +00:00
vgi_point:
jsr vgi_point_common
jmp vgi_loop
;========================
; VGI point common
;========================
2021-06-18 19:56:51 +00:00
VGI_PCOLOR = P0 ; if high bit set, then PX=PX+256
2021-06-18 19:56:51 +00:00
VGI_PX = P1
VGI_PY = P2
2021-06-25 13:47:33 +00:00
vgi_point_common:
ldy #0
lda VGI_PCOLOR
bpl vgi_point_color
iny
vgi_point_color:
and #$7f
tax
2021-06-18 19:56:51 +00:00
lda COLORTBL,X
sta HGR_COLOR
ldx VGI_PX
lda VGI_PY
jsr HPLOT0 ; plot at (Y,X), (A)
2021-06-25 13:47:33 +00:00
rts
2021-06-18 19:56:51 +00:00
;========================
; VGI line to
;========================
VGI_LX = P0
VGI_LY = P1
vgi_lineto:
ldx #0
ldy VGI_LY
lda VGI_LX
jsr HGLIN ; line to (X,A),(Y)
jmp vgi_loop
2021-06-25 13:47:33 +00:00
;========================
; VGI LINE
;========================
; VGI_LX = P0
; VGI_LY = P1
VGI_LX2 = P3
VGI_LY2 = P4
vgi_line:
jsr vgi_point_common
ldx #0
ldy VGI_LY2
lda VGI_LX2
jsr HGLIN ; line to (X,A),(Y)
jmp vgi_loop