]> git.sur5r.net Git - cc65/blob - libsrc/atmos/cvline.s
Removed (pretty inconsistently used) tab chars from source code base.
[cc65] / libsrc / atmos / cvline.s
1 ;
2 ; Ullrich von Bassewitz, 2003-04-13
3 ;
4 ; void cvlinexy (unsigned char x, unsigned char y, unsigned char length);
5 ; void cvline (unsigned char length);
6 ;
7
8         .export         _cvlinexy, _cvline
9         .import         setscrptr
10         .import         rvs
11         .import         popax
12         .importzp       ptr2
13
14         .include        "atmos.inc"
15
16
17 _cvlinexy:
18         pha                     ; Save the length
19         jsr     popax           ; Get X and Y
20         sta     CURS_Y          ; Store Y
21         stx     CURS_X          ; Store X
22         pla                     ; Restore the length and run into _cvline
23
24 _cvline:
25         tax                     ; Is the length zero?
26         beq     @L9             ; Jump if done
27 @L1:    jsr     setscrptr       ; Set ptr2 to screen, won't use X
28         lda     #'|'
29         ora     rvs
30         sta     (ptr2),y        ; Write one char
31         inc     CURS_Y
32 @L2:    dex
33         bne     @L1
34 @L9:    rts
35
36