diff options
Diffstat (limited to 'DESIGN')
-rw-r--r-- | DESIGN | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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. + |