2000-05-28 13:40:48 +00:00
|
|
|
;
|
|
|
|
; Ullrich von Bassewitz, 08.08.1998
|
|
|
|
;
|
2005-03-26 17:03:30 +00:00
|
|
|
; void __fastcall__ chlinexy (unsigned char x, unsigned char y, unsigned char length);
|
|
|
|
; void __fastcall__ chline (unsigned char length);
|
2000-05-28 13:40:48 +00:00
|
|
|
;
|
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
.export _chlinexy, _chline, chlinedirect
|
2016-06-05 12:58:38 +00:00
|
|
|
.import gotoxy, cputdirect
|
2005-03-26 17:03:30 +00:00
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
.include "zeropage.inc"
|
|
|
|
.include "apple2.inc"
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
_chlinexy:
|
2013-05-09 11:56:54 +00:00
|
|
|
pha ; Save the length
|
2016-06-05 12:58:38 +00:00
|
|
|
jsr gotoxy ; Call this one, will pop params
|
2013-05-09 11:56:54 +00:00
|
|
|
pla ; Restore the length and run into _chline
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
_chline:
|
2013-05-09 11:56:54 +00:00
|
|
|
.ifdef __APPLE2ENH__
|
2018-08-19 21:40:50 +00:00
|
|
|
ldx #'_' | $80 ; Underscore, screen code
|
|
|
|
.else
|
|
|
|
ldx #'-' | $80 ; Minus, screen code
|
2005-03-26 17:03:30 +00:00
|
|
|
.endif
|
2004-03-11 21:54:22 +00:00
|
|
|
|
|
|
|
chlinedirect:
|
2016-06-19 13:03:20 +00:00
|
|
|
stx tmp1
|
2013-05-09 11:56:54 +00:00
|
|
|
cmp #$00 ; Is the length zero?
|
|
|
|
beq done ; Jump if done
|
2016-06-19 13:03:20 +00:00
|
|
|
sta tmp2
|
|
|
|
: lda tmp1 ; Screen code
|
2013-05-09 11:56:54 +00:00
|
|
|
jsr cputdirect ; Direct output
|
2016-06-19 13:03:20 +00:00
|
|
|
dec tmp2
|
2013-05-09 11:56:54 +00:00
|
|
|
bne :-
|
2005-03-26 17:03:30 +00:00
|
|
|
done: rts
|