dos33fsprogs/graphics/hgr/vgi/vgi.s

81 lines
1.1 KiB
ArmAsm
Raw Normal View History

2021-06-18 18:04:47 +00:00
; VGI
.include "zp.inc"
.include "hardware.inc"
VGI_MAXLEN = 7
vgi_test:
jsr HGR2
; get pointer to image data
lda #<clock_data
sta VGIL
lda #>clock_data
sta VGIH
vgi_loop:
ldy #0
data_smc:
lda (VGIL),Y
sta VGI_BUFFER,Y
iny
cpy #VGI_MAXLEN
bne data_smc
lda TYPE
and #$f
clc
adc VGIL
sta VGIL
bcc no_oflo
inc VGIH
no_oflo:
lda TYPE
lsr
lsr
lsr
lsr
; look up action in jump table
asl
tax
lda vgi_rts_table+1,X
pha
lda vgi_rts_table,X
pha
rts ; "jump" to subroutine
vgi_rts_table:
2021-06-18 19:46:45 +00:00
.word vgi_clearscreen-1 ; 0 = clearscreen
.word vgi_simple_rectangle-1 ; 1 = simple rectangle
.word vgi_circle-1 ; 2 = plain circle
.word vgi_filled_circle-1 ; 3 = filled circle
2021-06-18 19:56:51 +00:00
.word vgi_point-1 ; 4 = dot
.word vgi_lineto-1 ; 5 = line to
2021-06-18 21:05:12 +00:00
.word vgi_dithered_rectangle-1 ; 6 = dithered rectangle
2021-06-18 18:04:47 +00:00
.word all_done-1
.word all_done-1
.word all_done-1
.word all_done-1
.word all_done-1
.word all_done-1
.word all_done-1
.word all_done-1
2021-06-18 19:46:45 +00:00
.word all_done-1 ; 15 = done
2021-06-18 18:04:47 +00:00
all_done:
jmp all_done
.include "vgi_clearscreen.s"
2021-06-18 19:46:45 +00:00
.include "vgi_circles.s"
2021-06-18 21:05:12 +00:00
.include "vgi_rectangle.s"
2021-06-18 19:56:51 +00:00
.include "vgi_lines.s"
2021-06-18 18:04:47 +00:00
.include "clock.data"