add chline, cvline functions

This commit is contained in:
Konstantin
2025-06-13 12:50:39 +03:00
parent 9afe980124
commit c28bafa581
5 changed files with 85 additions and 7 deletions

33
libsrc/agat/chline.s Normal file
View File

@@ -0,0 +1,33 @@
;
; Ullrich von Bassewitz, 08.08.1998
; Colin Leroy-Mira, 26.05.2025
; Konstantin Fedorov, 12.06.2025
;
; void chlinexy (unsigned char x, unsigned char y, unsigned char length);
; void chline (unsigned char length);
;
.export _chlinexy, _chline, chlinedirect
.import gotoxy, putchar
.include "zeropage.inc"
_chlinexy:
pha ; Save the length
jsr gotoxy ; Call this one, will pop params
pla ; Restore the length and run into _chline
_chline:
ldx #$1B ; horizontal line character
chlinedirect:
stx tmp1
cmp #$00 ; Is the length zero?
beq done ; Jump if done
sta tmp2
: lda tmp1 ; Screen code
jsr putchar ; Direct output
dec tmp2
bne :-
done: rts