coco3: Add assembler source for even lower calls
authorBrett Gordon <beretta42@gmail.com>
Thu, 8 Oct 2015 18:20:44 +0000 (14:20 -0400)
committerBrett Gordon <beretta42@gmail.com>
Thu, 8 Oct 2015 18:20:44 +0000 (14:20 -0400)
Kernel/platform-coco3/videoll.s [new file with mode: 0644]

diff --git a/Kernel/platform-coco3/videoll.s b/Kernel/platform-coco3/videoll.s
new file mode 100644 (file)
index 0000000..7a247f6
--- /dev/null
@@ -0,0 +1,32 @@
+;;;
+;;;  Low-Level Video Routines
+;;;
+;;;
+
+       .globl  _memset
+       .globl  _memcpy
+       
+       .area .video
+
+;;;   void *memset(void *d, int c, size_t sz)
+_memset:
+       pshs    x,y
+       ldb     7,s
+       ldy     8,s
+a@     stb     ,x+
+       leay    -1,y
+       bne     a@
+       puls    x,y,pc
+
+
+
+;;;   void *memcpy(void *d, const void *s, size_t sz)
+_memcpy:
+       pshs    x,y,u
+       ldu     8,s
+       ldy     10,s
+a@     ldb     ,u+
+       stb     ,x+
+       leay    -1,y
+       bne     a@
+       puls    x,y,u,pc
\ No newline at end of file