Small_C_Info

From ArchaicPixels: HuC and PCEAS Documentation

Jump to: navigation, search

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

NameSizeSignednessNotes
char 8 bits signedThe bytesize of the PCE hardware and should be used the most.
int 16 bitssignedThis 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 bitsN/A A special pointer type that is used almost exclusively internally
void N/A N/A This is not a valid type (even as a pointer) and cannot be used in HuC. It only in documentation for clarity of arguments and return values.

Workarounds

  • To access far data (such as something stored with #incbin), use the farpeekb(), farpeekw(), or farmemget() functions.
Personal tools