Shawn Jefferson Posted December 22, 2015 Share Posted December 22, 2015 With cc65, you need to remember that there are only 6 bytes of register variables (really zeropage locations that are saved and restored depending on which ones your functions use-and this adds overhead to your function too!), but since you are using static local variables, the others that don't get fit as register are in BSS (ie. given a static location, and not on the C stack), which usually makes the code faster and smaller. In Ilmenit's code anyway. In any project that isn't trivial, you will optimize your function variables appropriately, using register where appropriate and also just allocating your own zeropage variables also. Also, as you've pointed out, printf family of functions are quite large... for obvious reasons I think (compatibility, portability, flexibility, etc...) Also, file I/O is also quite large with cc65 and is sometimes better to roll your own unless you are looking for portability, IMO. Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.