Changes

SDCC and CPC

858 bytes added, 10:10, 13 March 2015
== Using This is a article about using [[SDCC and ]] to produce SDCC binaries on the CPC ==The artice was written in 2003 by [[Hans Hansen]]. It has been edited to suit 2006!
== Amstrad CPC and SDCC ==
void main(void)
{
printf(“C "C on Amstrad”Amstrad");
}
</pre>
[[Image:cpcsdcc003.gif]]
 
== Using FIOLIB ==
 
[[FIOLIB]] is a comprehensive library for C programs running under FutureOS.
== Using the assembler in SDCC ==
</pre>
 
== Troubleshooting and optimisation ==
Because of defined parameter-passing between Assembler and C, many people used the sdcc-parameter --oldralloc in the past. But when your project gets too big, you will run into a fatal error saying Caught signal 11: SIGSEGV. You can use the new register-allocator with parameter --fno-omit-frame-pointer to prevent this problem.
 
 
Optimisation:
Keep in mind that your code shrinks quite well when using sdcc-parameter --max-allocs-per-node xyz. For xyz choose a high value, eg. 6000.
Also the parameters --opt-code-speed and --opt-code-size exist.
 
[[Category:C]] [[Category:Programming]]
56
edits