The Compiler


RCC16 is an Oric targeted version of the LCC Compiler.

This compiler is decently ANSI compliant, and event support C++ comments as well as standard C comments.

Optimisation level can be modified using the OSDKCOMP variable. By default this variable will be initialized to -O2 value, but you can try -O3 for more aggresive optimizations.

Data types

Since the 6502 is an 8 bit processor, the data size are as follow:

  • Pointers are 16 bits long
  • char and shorts are 8 bits long
  • int are 16 bits long

Some standard functions (memcpy, printf, ...) are implemented, but most of the standard library is not available.

Some functions are just quick hacks done by directly calling the ROM functions. Unfortunately, ROM releases are different, and thus any code calling these functions will work only on ATMOS.

Known issues

Reported by Dbug the Thu 9th April 2020

Issue #37: Crash on parsing 0xif 0
Details: By replacing by mistake a #if 0 by 0xif 0, I ended up with an internal compiler crash (possibly in lex.c around line 535 according to Jylam)

Resolved issues

Reported by JiBĂ© Perin the Sun 18th April 2021
Fixed in OSDK 1.19

Issue #39: OSDK Preprocessor variable
Details: Is it possible to have a way to give parameter to preprocessor cpp.exe? Like adding a %OSDK_xxxx% to the cpp.exe command line in build.bat

Reported by NekoNoNiaow the Thu 28th March 2019
Fixed in OSDK 1.14

Issue #33: Compiler.exe crashes
Details: Compiler.exe crashes when compiling the following source:
void main(void)
 int returnValue;
 char* argv[] = { "dhrystone" };
 returnValue = main( sizeof(argv) / sizeof(*argv), argv );
Compile with:
%OSDK%\BIN\compiler.exe -Nlibc -O0 source.c >source.c2

Reported by Waskol the Wed 29th August 2018
Fixed in OSDK 1.13

Issue #27: Missing EQ0W_C code generator macro
Details: When compiling some C programs, the code generator creates EQ0W_C instructions which unfortunately are missing from the macro file. (See: topic)

comments powered by Disqus
Coverity Scan Build Status
Version 1.39
  • fix to allow inline assembler directives to be inserted at the proper location in the functions
Version 1.38
  • integrated all the latest changes from Fabrice Frances: Fixes some issues found by Goyo and Retroric regarding encoding of data tables by the compiler
Version 1.36
  • Fixes for the -O0 output
Version 1.35
  • defstring is used by the frontend not only to define strings (signed char data) but also for initializing unsigned char arrays. In this case, defstring will receive char data with possible negative char values which have to be printed as their corresponding unsigned char value.Very usefull when you want to spare a maximum of bytes in a size compo.