sd:sdcc
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| sd:sdcc [2026/04/13 17:33] – created appledog | sd:sdcc [2026/04/13 17:44] (current) – appledog | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| = SD/CC | = SD/CC | ||
| - | + | * SD/CC is TinyC for the SD-8516. | |
| - | SD/CC TinyC for the SD-8516 | + | |
| == Introduction | == Introduction | ||
| - | A self-hosted C compiler has been on the table for quite some time. A few weeks ago I was able to get something set up where it could compile: | + | A self-hosted C compiler has been my goal for quite some time. I did BASIC and Forth first. BASIC was useful, Forth -- not so much (from a practical standpoint). |
| + | |||
| + | At the end of March I was able to get something set up where it could compile: | ||
| int main(void) { return 0; } | int main(void) { return 0; } | ||
| - | The problem was that isn't very much. So I looked at the BASIC expression parser | + | The problem was that isn't very much. Weeks went by and I couldn' |
| <codify armasm> | <codify armasm> | ||
| Line 31: | Line 32: | ||
| </ | </ | ||
| - | This kind of works, we can return 3+5 now; but I need more. I've been trying to get a symbol table up and to define int; but it isn't working. | + | This works for + and -, we can return 3+5 now. Next I added negative numbers. I had to add a check for TOK_MINUS first and then emit a SUB A, B to get it to negate. |
| + | |||
| + | |||
| + | == Integers | ||
| + | * April 14th, 2026. | ||
| + | I've been trying to get a symbol table up and to define int; but it isn't working. I think there is an off by one bug on the stack. Storing variables on the stack is something I don't fully understand or trust yet. | ||
| + | |||
| + | What is really biting me in the ass is the system I came up with to pair 16-bit registers into 24-bit pointers. It's a charmingly retro, period-authentic thing. But it makes coding a bit hard when you need multiple pointers. I have a ' | ||
| More to come. | More to come. | ||
sd/sdcc.1776101590.txt.gz · Last modified: by appledog
