From 752e0fd9ec166ea8a513294fd44b7203af03d684 Mon Sep 17 00:00:00 2001
From: Nao Pross <naopross@thearcway.org>
Date: Tue, 2 May 2017 00:06:10 +0200
Subject: switch to sdcc

    - update of the makefile to use sdcc, since it is more popular and
    it's easier to insall on other computers

    - fix of crt0.s (old loader.asm) for the new compiler

    - change of the structure in the source code folder to separate
      betweeen libc and kernel code
---
 sw/z80/kernel/include/types.h |  9 +++++++++
 sw/z80/kernel/kernel.c        | 10 ++++++++++
 2 files changed, 19 insertions(+)
 create mode 100644 sw/z80/kernel/include/types.h
 create mode 100644 sw/z80/kernel/kernel.c

(limited to 'sw/z80/kernel')

diff --git a/sw/z80/kernel/include/types.h b/sw/z80/kernel/include/types.h
new file mode 100644
index 0000000..adde214
--- /dev/null
+++ b/sw/z80/kernel/include/types.h
@@ -0,0 +1,9 @@
+#ifndef __TYPES_H__
+#define __TYPES_H__
+
+#define int8_t      char
+#define uint8_t     unsigned char
+#define int16_t     int
+#define uint16_t    unsigned int
+
+#endif
diff --git a/sw/z80/kernel/kernel.c b/sw/z80/kernel/kernel.c
new file mode 100644
index 0000000..fe87c3d
--- /dev/null
+++ b/sw/z80/kernel/kernel.c
@@ -0,0 +1,10 @@
+#include "types.h"
+
+
+void main(void)
+{
+    int i, j = 20;
+    for (i = 0; i < 10; i++) {
+        j--;
+    }
+}
-- 
cgit v1.2.1


From 1ec8f14f03322e3fe1f56f4abcbc85f5c2934dfc Mon Sep 17 00:00:00 2001
From: Nao Pross <naopross@thearcway.org>
Date: Tue, 2 May 2017 16:14:41 +0200
Subject: fix for sdcc makefile

fix for the old makefile, because it could't compile more than one source file.
new libc directory with mem.c to start implementing the standard  C library
(or at least the part we need).
---
 sw/z80/kernel/include/types.h | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'sw/z80/kernel')

diff --git a/sw/z80/kernel/include/types.h b/sw/z80/kernel/include/types.h
index adde214..c24b311 100644
--- a/sw/z80/kernel/include/types.h
+++ b/sw/z80/kernel/include/types.h
@@ -6,4 +6,6 @@
 #define int16_t     int
 #define uint16_t    unsigned int
 
+#define size_t      uint16_t
+
 #endif
-- 
cgit v1.2.1