Table of Contents

How-Tos

Set up NeoVim on Linux for C development

This even (mostly) works for retro systems! With Conquer of Completion installed:

Local references to headers and comments on functions work. Doxygen on macros don't seem to work, though.

References

Unit test on retro machines

https://github.com/ennorehling/cutest works on IBM PC and Amiga.

Amiga config

With SAS/C: sc link math=standard lib_test.c lib.c cutest/CuTest.c link. If your linker is complaining about __CXC55, linking to the standard math library is needed.

Increase the stack size before running tests. There's a big char variable defined as the buffer for the string output that will make smaller stacks fail. On the Amiga: stack 32000 then run the command. On Vamos, vamos -s 32 command.

References

Recast a void star pointer to be used to fill another data type

If you want to take a void pointer then use it for building a structure of objects of the same data size, recast it:

snippet.c
void *myRAM;
 
// allocate the ram
 
short *shortInterface = (short *)myRAM;
shortInterface++; //=> incremented by 2