]> git.sur5r.net Git - cc65/blob - libsrc/geos-common/conio/chline.s
Removed (pretty inconsistently used) tab chars from source code base.
[cc65] / libsrc / geos-common / 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             .export _chlinexy, _chline
10             .import popa, _gotoxy, fixcursor
11             .importzp cursor_x, cursor_y, cursor_c
12
13             .include "jumptab.inc"
14             .include "geossym.inc"
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         clc
32         adc #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         lda #0
40         sta r4L+1
41         ldx #r4
42         ldy #3
43         jsr DShiftLeft
44         clc                     ; one pixel less
45         lda r4L
46         sbc #0
47         sta r4L
48         lda r4L+1
49         sbc #0
50         sta r4L+1
51         lda #%11111111          ; pattern
52         jsr HorizontalLine
53         jsr fixcursor
54 L9:     rts