From d6b64c65a0d09dba96a65edd2959bd58fe781fcc Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sun, 14 May 2017 19:20:38 +0200 Subject: some small fixes, clang image overload (magic doesn't work, most likely because memory is not wiped between qemu invocations) --- DESIGN | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'DESIGN') diff --git a/DESIGN b/DESIGN index b7ba1e2..b9a899b 100644 --- a/DESIGN +++ b/DESIGN @@ -1,11 +1,22 @@ design principles ----------------- +The final goal is a self-hosting, self-compiling system, so we will +have to implement or port the assember, the C compiler, a linker and +a make program into the new operating system. So featuritis and +non-standards will kill the project fast! + Use strict ANSI C99. This means no inline-assembly. This means we have to write assembly routines if we need things not available in C (lgdt, in, out, etc.). +Use the cdecl calling convetion when calling assembly from C. +Stick to NASM assembly bare features (equ, org). Use only the absolute +minimum. Make sure it compiles with every ANSI C99 compiler (gcc, clang, tcc, ...). +Use only what is needed, nothing fancy. +Try to compile as often as possible with different compilers on different +host systems. Use only very simple makefile rules. Make sure we could also just use a simple shell script to compile the kernel. @@ -13,3 +24,4 @@ use a simple shell script to compile the kernel. Avoid implementation and using of unsafe C functions. Provide safe counterparts wherever possible. There are of course exceptions like scrolling the VGA buffer with a memmove. + -- cgit v1.2.3-54-g00ecf