]> git.sur5r.net Git - cc65/blob - libsrc/cbm/chline.s
Add support for computed gotos
[cc65] / libsrc / cbm / 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
9         .import         gotoxy, cputdirect
10         .importzp       tmp1, chlinechar
11
12 _chlinexy:
13         pha                     ; Save the length
14         jsr     gotoxy          ; Call this one, will pop params
15         pla                     ; Restore the length
16
17 _chline:
18         cmp     #0              ; Is the length zero?
19         beq     L9              ; Jump if done
20         sta     tmp1
21 L1:     lda     #chlinechar     ; Horizontal line, screen code
22         jsr     cputdirect      ; Direct output
23         dec     tmp1
24         bne     L1
25 L9:     rts