1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-25 02:29:52 +00:00
cc65/libsrc/telestrat/chline.s

35 lines
860 B
ArmAsm
Raw Normal View History

2018-04-14 20:05:03 +00:00
;
2021-03-01 21:33:12 +00:00
; void chlinexy (unsigned char x, unsigned char y, unsigned char length);
2018-04-14 20:05:03 +00:00
; void chline (unsigned char length);
;
2021-03-01 21:33:12 +00:00
.export _chlinexy, _chline
2022-04-17 14:06:22 +00:00
2021-03-01 21:33:12 +00:00
.import rvs, display_conio, update_adscr
.import popax
2018-04-14 20:05:03 +00:00
.include "telestrat.inc"
2021-03-01 21:33:12 +00:00
_chlinexy:
pha ; Save the length
jsr popax ; Get X and Y
sta SCRY ; Store Y
stx SCRX ; Store X
jsr update_adscr
pla ; Restore the length and run into _chline
_chline:
tax ; Is the length zero?
beq @L9 ; Jump if done
2022-04-17 14:06:22 +00:00
@L1:
2021-03-01 21:33:12 +00:00
lda #'-' ; Horizontal line screen code
ora rvs
jsr display_conio
@L2: dex
bne @L1
@L9: rts
2018-04-14 20:05:03 +00:00