]> git.sur5r.net Git - cc65/blob - libsrc/apple2/chline.s
Removed (pretty inconsistently used) tab chars from source code base.
[cc65] / libsrc / apple2 / chline.s
1 ;
2 ; Ullrich von Bassewitz, 08.08.1998
3 ;
4 ; void __fastcall__ chlinexy (unsigned char x, unsigned char y, unsigned char length);
5 ; void __fastcall__ chline (unsigned char length);
6 ;
7
8         .export         _chlinexy, _chline, chlinedirect
9         .import         popa, _gotoxy, cputdirect
10
11         .include        "zeropage.inc"
12         .include        "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         .ifdef  __APPLE2ENH__
22         ldx     #'S'            ; MouseText character
23         ldy     INVFLG
24         cpy     #$FF            ; Normal character display mode?
25         beq     chlinedirect
26         .endif
27         ldx     #'-' | $80      ; Horizontal line, screen code
28
29 chlinedirect:
30         cmp     #$00            ; Is the length zero?
31         beq     done            ; Jump if done
32         sta     tmp1
33 :       txa                     ; Screen code
34         jsr     cputdirect      ; Direct output
35         dec     tmp1
36         bne     :-
37 done:   rts