Fix many bugs

This commit is contained in:
jede
2021-03-01 22:33:12 +01:00
parent b8889bf37e
commit 02e52fe24d
8 changed files with 109 additions and 55 deletions

View File

@@ -1,22 +1,34 @@
;
; jede jede@oric.org 2018-04-17
;
; void chlinexy (unsigned char x, unsigned char y, unsigned char length);
; void chline (unsigned char length);
;
.export _chline
.export _chlinexy, _chline
.import rvs, display_conio, update_adscr
.import popax
.include "telestrat.inc"
.include "zeropage.inc"
.proc _chline
sta tmp1
@loop:
lda #'-' ; horizontal line screen code
BRK_TELEMON XWR0 ; macro send char to screen (channel 0 in telemon terms)
dec tmp1
bne @loop
rts
.endproc
_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
@L1:
lda #'-' ; Horizontal line screen code
ora rvs
jsr display_conio
@L2: dex
bne @L1
@L9: rts