~vdupras/duskos

duskos/fs/doc/cc/index.txt -rw-r--r-- 1.3 KiB
c515797bVirgil Dupras comp/c/vm/i386: fix integer promotion bug in logical ops 3 hours ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Dusk OS C compiler

The C compiler is a central piece of Dusk OS. It's written in Forth and is
loaded very early in the boot process so that it can compile the drivers we're
about to use.

This compiler needs to meet two primary design goals:

1. Be as elegant and expressive as possible in the context of a Forth, that is,
   be an elegant fallback to Forth's shortcomings.
2. Minimize the work needed to port existing C applications.

It is *not* a design goal of this C compiler to be able to compile POSIX
applications without changes. It is expected that a significant porting effort
will be needed each time.

Because of the first goal, we have to diverge from ANSI C. The standard library
will likely be significantly different, the macro system too. Both will
hopefully fit better with Forth than their ANSI counterparts.

But because of the second goal, we do want to stay reasonably close to ANSI.
The idea is that the porting effort should be mostly a mechanical effort and
it should be as little prone as possible to subtle logic changes caused by the
porting.

For this reason, the core of the language is very close to ANSI C.

## Topics

* Usage (doc/cc/usage)
* Implementation details (doc/cc/impl)
* Standard Library (doc/cc/lib)
* DuskCC's Forth VM details (doc/cc/forth)