mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-11-16 08:05:31 +00:00
b1238af49d
this will probably upset people
68 lines
1.4 KiB
ArmAsm
68 lines
1.4 KiB
ArmAsm
;=====================================================================
|
|
;= ROUTINES
|
|
;=====================================================================
|
|
|
|
;================================
|
|
; hlin_setup
|
|
;================================
|
|
; put address in GBASL/GBASH
|
|
; Ycoord in A, Xcoord in Y
|
|
hlin_setup:
|
|
sty TEMPY ; 3
|
|
tay ; y=A ; 2
|
|
lda gr_offsets,Y ; lookup low-res memory address ; 4
|
|
clc ; 2
|
|
adc TEMPY ; 3
|
|
sta GBASL ; 3
|
|
iny ; 2
|
|
|
|
lda gr_offsets,Y ; 4
|
|
adc DRAW_PAGE ; add in draw page offset ; 3
|
|
sta GBASH ; 3
|
|
rts ; 6
|
|
;===========
|
|
; 35
|
|
;================================
|
|
; hlin_double:
|
|
;================================
|
|
; HLIN Y, V2 AT A
|
|
; Y, X, A trashed
|
|
; start at Y, draw up to and including X
|
|
hlin_double:
|
|
;int hlin_double(int page, int x1, int x2, int at) {
|
|
|
|
jsr hlin_setup ; 41
|
|
|
|
sec ; 2
|
|
lda V2 ; 3
|
|
sbc TEMPY ; 3
|
|
|
|
tax ; 2
|
|
inx ; 2
|
|
;===========
|
|
; 53
|
|
; fallthrough
|
|
|
|
;=================================
|
|
; hlin_double_continue: width
|
|
;=================================
|
|
; GBASL has correct offset for row/col
|
|
; width in X
|
|
|
|
hlin_double_continue:
|
|
|
|
ldy #0 ; 2
|
|
lda COLOR ; 3
|
|
hlin_double_loop:
|
|
sta (GBASL),Y ; 6
|
|
inc GBASL ; 5
|
|
dex ; 2
|
|
bne hlin_double_loop ; 2nt/3
|
|
|
|
rts ; 6
|
|
;=============
|
|
; 53+5+X*16+5
|
|
|
|
|
|
|