retroforth/doc/book/Advanced-Builds
crc ea11871f3b book files now under doc/book
FossilOrigin-Name: d9fdb9041d22c8587afdc7e70aa1f85d85d66faa2c425ddb4b420b935a75037e
2019-03-29 20:00:20 +00:00

42 lines
1.5 KiB
Text

# Advanced Builds
## Reduced Memory
RETRO can be built for reduced memory targets. This is primarily
intendeded for use with embedded targets, but can be useful on
large machines as well.
To do this, `make` with `CFLAGS` set to `-DMEM1024K`, `-DMEM512K`,
`-DMEM256K`, `-DMEM192K`, `-DMEM128K`' or `-DMEM96K`. These will
target memory sizes as specified per the following table.
| | 1024kB | 512kB | 256kB | 192kB | 128kB | 96kB |
| ------------- | --------- | ------- | ------- | ------- | ------- | ------ |
| Total Bytes | 1,048,579 | 524,288 | 262,144 | 196,608 | 131,072 | 98,304 |
| Image | 968,000 | 450,000 | 192,000 | 126,000 | 96,000 | 72,000 |
| Data Stack | 512 | 512 | 512 | 512 | 512 | 512 |
| Address Stack | 1,024 | 1,024 | 1,024 | 1,024 | 1,024 | 1,024 |
| Remaining | 79,040 | 72,752 | 68,608 | 69,072 | 33,536 | 24,768 |
The remaining memory is available for use by the VM.
## Custom Image
For users of BSD, Linux, macOS, you can customize the image at
build time.
In the top level directory is a `package` directory containing
a file named `list`. You can add files to compile into your
system by adding them to the `list` and rebuilding.
Example:
If you have wanted to include the NumbersWithoutPrefixes.forth
example, add:
~~~
'example/NumbersWithoutPrefixes.forth include
~~~
To the start of the `list` file and then run `make` again. The
newly built `bin/retro` will now include your additions.