standardize
This commit is contained in:
@@ -31,7 +31,7 @@ Address range|Size (bytes)|Purpose
|
||||
0x0000-0x00ff|256 |Main stack
|
||||
0x0100-0x01ff|256 |Return stack
|
||||
0x0200-0x021f|32 |Literal stack
|
||||
0x0220-0x0221|2 |PC
|
||||
0x0220-0x0221|2 |PC (program counter)
|
||||
0x0222-0x0223|2 |MSP (main stack pointer)
|
||||
0x0224-0x0225|2 |RSP (return stack pointer)
|
||||
0x0226 |1 |LSP (literal stack pointer)
|
||||
@@ -144,15 +144,24 @@ The following constants can be adjusted at compile time:
|
||||
|
||||
### Building with GCC/Clang/MinGW (for current mainstream targets)
|
||||
|
||||
Build with default parameters:
|
||||
Build with default parameters (you can override any of the above constants with `-D` switch:
|
||||
|
||||
```
|
||||
cc --std=c89 -Os -o equi equi.c
|
||||
cc -std=c89 -Os -o equi equi.c [-DSTACK_SIZE=... ...]
|
||||
```
|
||||
|
||||
Build with reconfiguring the defaults - specify any of the above constants after `-D` switch:
|
||||
### Building with TCC (TinyCC, Tiny C Compiler)
|
||||
|
||||
Equi's codebase detects TCC and attempts to save size by linking against tcclib instead of the standard libraries. Note that TCC doesn't support size optimization switches and C89 standard in the most recent versions, so it will fall back to C99 instead. Anyway, the most sensible command to build Equi with TCC is:
|
||||
|
||||
```
|
||||
cc --std=c89 -Os [-DSTACK_SIZE=... ...] -o equi equi.c
|
||||
tcc -std=c89 -o equi equi.c [-DSTACK_SIZE=... ...]
|
||||
```
|
||||
|
||||
### Building with CC65 (for 6502-based targets)
|
||||
|
||||
This is where things start to get interesting, as we need to specify the exact target machine for CC65. For now, Equi reference implementation is only being tested for Apple II, so the commands to build it would be:
|
||||
|
||||
```
|
||||
cc65 --standard c89 -O -Os -t apple2 -o equi.s equi.c
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user