Skip to content

Small C Info

Bob Frasure edited this page Jan 5, 2025 · 1 revision

Basics

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

HuC's Types

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.

Workarounds

Clone this wiki locally