I'm having a bit of a problem, and I do not understand. The program went fine until line 1200. Now the program reboots. It well under the 32KB limit, which is now 17.2 KB. I guessed first it was the function size issue, which might have a limit of 255 lines. Void have 2 byte, not exactly what the number are for, I'm guessing it was for ID#,pointer to keep track of line # number. Then I remove the function from that tree and made it own tree so that function could stop and call the new function. Still the same issue, strangely. If I remove the statement completely, the program runs perfectly. I organized the program as logically as I can, so that Warning messages from the compiler would disappear. Still reboot.
The function is called, TownScene. There is 6 different area that you can go to, which is branched into an if statement with series of loading sprite and tiling the scene from a function.
I think the only thing I can try now is to get a number or value from TownScene(), end that function to go back to main(), then select the statement that was selected from TownScene(). Try moving the image data to it own textpad if the SDCC compiler have a limit, I don't feel comfortable doing that. If I must move the images it it own file, I will do it. I like to keep thing in one place.
Any idea appreciated.
Edited by Kiwi, Mon Sep 6, 2010 11:35 PM.