]> git.sur5r.net Git - cc65/commitdiff
Added missing PCE conio functions. 609/head
authorStefan <stefan.haubenthal@gmail.com>
Sat, 10 Mar 2018 23:49:40 +0000 (00:49 +0100)
committerStefan <stefan.haubenthal@gmail.com>
Sat, 10 Mar 2018 23:49:40 +0000 (00:49 +0100)
libsrc/pce/cclear.s [new file with mode: 0644]
libsrc/pce/color.s
libsrc/pce/wherex.s [new file with mode: 0644]
libsrc/pce/wherey.s [new file with mode: 0644]

diff --git a/libsrc/pce/cclear.s b/libsrc/pce/cclear.s
new file mode 100644 (file)
index 0000000..14b9d0e
--- /dev/null
@@ -0,0 +1,25 @@
+;
+; Ullrich von Bassewitz, 08.08.1998
+;
+; void cclearxy (unsigned char x, unsigned char y, unsigned char length);
+; void cclear (unsigned char length);
+;
+
+        .export         _cclearxy, _cclear
+        .import         gotoxy, cputdirect
+        .importzp       tmp1
+
+_cclearxy:
+        pha                     ; Save the length
+        jsr     gotoxy          ; Call this one, will pop params
+        pla                     ; Restore the length and run into _cclear
+
+_cclear:
+        cmp     #0              ; Is the length zero?
+        beq     L9              ; Jump if done
+        sta     tmp1                                 
+L1:     lda     #$20            ; Blank - screen code
+        jsr     cputdirect      ; Direct output
+        dec     tmp1
+        bne     L1
+L9:     rts
index 0ff991a2e38519d240ac95d179070a0a1a45fb40..1223d2936e8f45308fe5f2380755f325badae8a3 100644 (file)
@@ -5,11 +5,14 @@
 ;
 
 
-        .export     _textcolor, _bgcolor, _bordercolor
+        .export         _textcolor, _bgcolor, _bordercolor
+        .import         return0
 
         .include        "pce.inc"
         .include        "extzp.inc"
 
+_bordercolor    = return0
+
 _textcolor:
         ldx     CHARCOLOR       ; get old value
         sta     CHARCOLOR       ; set new value
@@ -32,11 +35,6 @@ _bgcolor:
         txa
         rts
 
-_bordercolor:
-        lda     #0
-        tax
-        rts
-
         .rodata
         .export colors
 
diff --git a/libsrc/pce/wherex.s b/libsrc/pce/wherex.s
new file mode 100644 (file)
index 0000000..3abe49c
--- /dev/null
@@ -0,0 +1,24 @@
+;
+; Ullrich von Bassewitz, 2003-05-02
+;
+; unsigned char wherex (void);
+;
+
+        .export         _wherex
+
+        .include        "pce.inc"
+        .include        "extzp.inc"
+
+.proc   _wherex
+
+        lda     CURS_X
+        ldx     #$00
+        rts
+
+.endproc
+
+;-------------------------------------------------------------------------------
+; force the init constructor to be imported
+
+        .import initconio
+conio_init      = initconio
diff --git a/libsrc/pce/wherey.s b/libsrc/pce/wherey.s
new file mode 100644 (file)
index 0000000..7061790
--- /dev/null
@@ -0,0 +1,24 @@
+;
+; Ullrich von Bassewitz, 2003-05-02
+;
+; unsigned char wherey (void);
+;
+
+        .export         _wherey
+
+        .include        "pce.inc"
+        .include        "extzp.inc"
+
+.proc   _wherey
+
+        lda     CURS_Y
+        ldx     #$00
+        rts
+
+.endproc
+
+;-------------------------------------------------------------------------------
+; force the init constructor to be imported
+
+        .import initconio
+conio_init      = initconio