]> git.sur5r.net Git - cc65/blobdiff - libsrc/atari5200/chline.s
atari5200: implement bgcolor() and textcolor()
[cc65] / libsrc / atari5200 / chline.s
index d5872f149dc59c62eafb25e8369722d1d4fbc725..47c57966bc84cd77585085699d0cfc40d3a2e161 100644 (file)
@@ -1 +1,26 @@
-.include "../atari/chline.s"
+;
+; Ullrich von Bassewitz, 08.08.1998
+;
+; void chlinexy (unsigned char x, unsigned char y, unsigned char length);
+; void chline (unsigned char length);
+;
+
+        .export         _chlinexy, _chline
+        .import         gotoxy, cputdirect
+        .importzp       tmp1
+        .include        "atari5200.inc"
+
+_chlinexy:
+        pha                     ; Save the length
+        jsr     gotoxy          ; Call this one, will pop params
+        pla                     ; Restore the length
+
+_chline:
+        cmp     #0              ; Is the length zero?
+        beq     L9              ; Jump if done
+        sta     tmp1
+L1:     lda     #CH_HLINE       ; Horizontal line, screen code
+        jsr     cputdirect      ; Direct output
+        dec     tmp1
+        bne     L1
+L9:     rts