]> git.sur5r.net Git - cc65/blob - libsrc/apple2enh/chline.s
Moved additional zeropage variables into an extra module.
[cc65] / libsrc / apple2enh / chline.s
1 ;
2 ; Ullrich von Bassewitz, 08.08.1998
3 ;
4 ; void chlinexy (unsigned char x, unsigned char y, unsigned char length);
5 ; void chline (unsigned char length);
6 ;
7
8         .export         _chlinexy, _chline, chlinedirect
9         .import         popa, _gotoxy, cputdirect
10         .importzp       tmp1
11
12         .include        "../apple2/apple2.inc"
13
14 _chlinexy:
15         pha                     ; Save the length
16         jsr     popa            ; Get y
17         jsr     _gotoxy         ; Call this one, will pop params
18         pla                     ; Restore the length and run into _chline
19
20 _chline:
21         ldx     #'S'            ; MouseText character
22         ldy     INVFLG
23         cpy     #$FF            ; Normal character display mode?
24         beq     chlinedirect
25         ldx     #'-' | $80      ; Horizontal line, screen code
26
27 chlinedirect:
28         cmp     #$00            ; Is the length zero?
29         beq     L9              ; Jump if done
30         sta     tmp1
31 L1:     txa                     ; Screen code
32         jsr     cputdirect      ; Direct output
33         dec     tmp1
34         bne     L1
35 L9:     rts
36
37
38
39