Hi,
I'm trying to find resources on best practices for writing efficient C code on the 68000. I've found http://www.mactech.com/articles/mactech ... index.html which looks like a good article.
Are there others that would be helpful?
Thanks!
DJCC
Best practices for writing C on 68000?
Moderator: BigEvilCorporation
-
- Very interested
- Posts: 710
- Joined: Sat Feb 18, 2012 2:44 am
Many C optimization tricks are CPU-independent, so you may check these two pages, they are about CC65 compiler and 6502: 1, 2.
However, it is a good idea to test some of the tricks and check assembly output, because in your enviroment one tricks could be effective, while other aren't too effective to be worthwhile to use.
However, it is a good idea to test some of the tricks and check assembly output, because in your enviroment one tricks could be effective, while other aren't too effective to be worthwhile to use.
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
Just by reading the assembly output you can learn how the help the compiler to optimize its code.Shiru wrote:Many C optimization tricks are CPU-independent, so you may check these two pages, they are about CC65 compiler and 6502: 1, 2.
However, it is a good idea to test some of the tricks and check assembly output, because in your enviroment one tricks could be effective, while other aren't too effective to be worthwhile to use.
I did it a lot in SGDK so usually the loop / code style in SGDK should produces efficient GCC compiled code