]> git.sur5r.net Git - cc65/blob - libsrc/geos-common/conio/cvline.s
Moved the 'conio' files from 'geos-cbm' to 'geos-common' which are believed to work...
[cc65] / libsrc / geos-common / conio / cvline.s
1 ;
2 ; Maciej 'YTM/Elysium' Witkowiak
3 ;
4 ; 06.03.2002
5
6 ; void cvlinexy (unsigned char x, unsigned char y, unsigned char length);
7 ; void cvline (unsigned char length);
8
9             .include "jumptab.inc"
10             .include "geossym.inc"
11
12             .export             _cvlinexy, _cvline
13             .import             popa, _gotoxy, fixcursor
14             .importzp           cursor_x, cursor_y, cursor_r
15
16 _cvlinexy:
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 _cvline:
23         cmp     #0              ; Is the length zero?
24         beq     L9              ; Jump if done
25         tax
26         lda     cursor_x        ; x position
27         clc
28         adc     #4              ; in the middle of cell
29         sta     r4L
30         lda     cursor_x+1
31         adc     #0
32         sta     r4L+1
33         lda     cursor_y        ; top start
34         sta     r3L
35         txa                     ; bottom end
36         clc
37         adc     cursor_r
38         sta     cursor_r
39         sta     r3H
40         asl     r3H
41         asl     r3H
42         asl     r3H
43         lda     #%11111111      ; pattern
44         jsr     VerticalLine
45         jsr     fixcursor
46 L9:     rts