]> git.sur5r.net Git - cc65/blob - libsrc/geos-cbm/conio/chline.s
Renamed the old geos target to geos-cbm.
[cc65] / libsrc / geos-cbm / conio / chline.s
1 ;
2 ; Maciej 'YTM/Elysium' Witkowiak
3 ;
4 ; 06.03.2002
5
6 ; void chlinexy (unsigned char x, unsigned char y, unsigned char length);
7 ; void chline (unsigned char length);
8
9             .include "../inc/jumptab.inc"
10             .include "../inc/geossym.inc"
11
12             .export             _chlinexy, _chline
13             .import             popa, _gotoxy, fixcursor
14             .importzp           cursor_x, cursor_y, cursor_c
15
16 _chlinexy:
17         pha                     ; Save the length
18         jsr     popa            ; Get y
19         jsr     _gotoxy         ; Call this one, will pop params
20         pla                     ; Restore the length
21
22 _chline:
23         cmp     #0              ; Is the length zero?
24         beq     L9              ; Jump if done
25         tax
26         lda     cursor_x        ; left start
27         sta     r3L
28         lda     cursor_x+1
29         sta     r3L+1
30         lda     cursor_y        ; level
31         sec
32         sbc     #4              ; in the middle of a cell
33         sta     r11L
34         txa                     ; right end
35         clc
36         adc     cursor_c
37         sta     cursor_c
38         sta     r4L
39         ldx     #r4
40         ldy     #3
41         jsr     DShiftLeft
42         lda     #%11111111      ; pattern
43         jsr     HorizontalLine
44         jsr     fixcursor
45 L9:     rts