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

29
libsrc/agat/cvline.s Normal file
View File

@@ -0,0 +1,29 @@
;
; Ullrich von Bassewitz, 08.08.1998
; Colin Leroy-Mira, 26.05.2025
; Konstantin Fedorov, 12.06.2025
;
; void cvlinexy (unsigned char x, unsigned char y, unsigned char length);
; void cvline (unsigned char length);
;
.export _cvlinexy, _cvline
.import gotoxy, putchardirect, newline
.include "zeropage.inc"
_cvlinexy:
pha ; Save the length
jsr gotoxy ; Call this one, will pop params
pla ; Restore the length and run into _cvline
_cvline:
cmp #$00 ; Is the length zero?
beq done ; Jump if done
sta tmp2
: lda #$5C ; vertical line character
jsr putchardirect ; Write, no cursor advance
jsr newline ; Advance cursor to next line
dec tmp2
bne :-
done: rts