sd:programming_in_c_for_the_sd-8516
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| sd:programming_in_c_for_the_sd-8516 [2026/06/17 10:02] – appledog | sd:programming_in_c_for_the_sd-8516 [2026/06/17 12:24] (current) – appledog | ||
|---|---|---|---|
| Line 26: | Line 26: | ||
| == Self Hosted TinyC v2 | == Self Hosted TinyC v2 | ||
| - | v2 is v1 written in C. It compiles but there are issues I am working on. | + | v2 is v1 written in C. It compiles but there are issues. The issues revolve around the fact that this type of computer system is not really intended to host and run a C compiler. It can be done but as I have learned, the easy way forward is to rewrite the memory map and the kernal. This creates a chicken and egg problem. I need to rewrite the kernal, but I don't feel the need to rewrite the kernal in C just to rewrite the C compiler. |
| == v3 (LLVM Back-end) | == v3 (LLVM Back-end) | ||
| - | The LLVM back-end is not self hosted | + | The LLVM back-end is not self hosted, obviously. However, I am learning a lot about C by doing this and I may be able to use what I know to help write v4 under the v2 compiler. Or at least, write v4 in v3 then try to back-work v1/v2 to compile that. Either way, this is the path forward. |
| - | a) I demonstrated that V1 can compile V2 | + | == What about right now? |
| - | b) I demonstrated that V2 can compile V2 | + | Given all this I recommend you program in assembly first. That's really what this project is about, |
| - | c) The issues surrounding a v3 from a v2 are memory management issues and: | + | |
| - | d) They could be solved by reworking | + | |
| - | === Here's the thing | + | However, |
| - | v1, v2, and v3 are not intended to be frestanding in the sense that they use INT 0x10 for putchar and getchar. | + | |
| - | + | ||
| - | I just wanted to try it with LLVM I guess. I tell myself | + | |
| - | + | ||
| - | # Get the LLVM backend up. | + | |
| - | # rewire the memory map to put the kernal in bank 0 | + | |
| - | # ...as we rewrite the kernal in C | + | |
| - | + | ||
| - | This all needs to be done anyways because carts will need to be freestanding | + | |
| - | + | ||
| - | == The big issue | + | |
| - | The big issue now is how to package | + | |
| - | + | ||
| - | Currently if you want to write C for the SD-8516.. frankly, write your program and send it to me and I'll compile it for you. Trust me when I say that is easier. | + | |
| - | + | ||
| - | Packaging it simply will take too much time away from developing | + | |
sd/programming_in_c_for_the_sd-8516.1781690561.txt.gz · Last modified: by appledog
