forked from ArtemioUrbina/huc
-
Couldn't load subscription status.
- Fork 16
Small C Info
Bob Frasure edited this page Jan 5, 2025
·
1 revision
Small C is a pre-standard version of C so it's close in comparison. However, there are some significant and annoying differences.
differences:
- function declaration synatax
- static variables cannot be used as parameters
- structures require a workaround
- enumerations don't exist
- function pointers require a workaround
- multidimensional arrays are not supported
| Name | Size | Signedness | Notes |
|---|---|---|---|
| char | 8 bits | signed | The bytesize of the PCE hardware and should be used the most. |
| int | 16 bits | signed | This is actually a type invented for convenience that is composed of two 8 bit values. Therefore, you should use this type sparingly. Additionally, it is used to denote addresses in many functions. |
| farptr | 24 bits | N/A | A special pointer type that is used almost exclusively internally |
| void | N/A | N/A | This is not a valid type and cannot be used in HuC. It only in documentation for clarity of arguments and return values. |
- To access far data (such as something stored with #incbin), use the farpeekb(), farpeekw(), or farmemget() functions.