coco3: add video init function.
authorBrett Gordon <beretta42@gmail.com>
Thu, 8 Oct 2015 18:35:55 +0000 (14:35 -0400)
committerBrett Gordon <beretta42@gmail.com>
Thu, 8 Oct 2015 18:35:55 +0000 (14:35 -0400)
Kernel/platform-coco3/coco3.s
Kernel/platform-coco3/video.c

index 2de9d35..826559b 100644 (file)
@@ -33,6 +33,7 @@
             .globl unix_syscall_entry
            .globl nmi_handler
            .globl null_handler
+           .globl video_init
 
             include "kernel.def"
             include "../kernel09.def"
@@ -161,11 +162,7 @@ b@ sta     ,x+
        sta     $ffb0
        stb     $ffb8
        ;; clear video memory
-       ldx     #$ac00
-       lda     #$20
-a@     sta     ,x+
-       cmpx    #$bbd0
-       bne     a@
+       jsr     _video_init
         ;; Our vectors are in high memory unlike Z80 but we still
         ;; need vectors
        ldu     #0xfeee         ; vector area
index 631da1c..a05ffb3 100644 (file)
@@ -97,3 +97,11 @@ unsigned char vt_map(unsigned char c)
                return 0x5E; /* up arrow */
        return c;
 }
+
+
+void video_init( )
+{
+       map_for_video();
+       memset( (char *)0x2000, ' ', 0x4000 );
+       map_for_kernel();
+}