How does one get around the 8811 byte limit in an assembly program?

Also thanks to all the people who have been answering my questions, I would not have gotten anywhere without you all Very Happy Good Idea
Do you have more than 8811 bytes of specifically executable code, not code + data? Because the 8811-byte limit only prevents execution of code more than 8811 bytes into a program. As long as you have less code than this and define all the code before any data in your program, this limit will not apply. You could include as much data at the end of your program as can fit into RAM. To be on the safe side, considering other things that may be in RAM, you should probably limit your program's total size to about 20KB anyway.

If you have more than 8811 bytes of executable code, then you have three (reasonable) options:
  1. Disable the 8811-byte limit with a method like Fullrene. Copy the code from the second code block in the first post, paste it into the setup part of your program's code, and remove all REP_NEXT lines. However, this method relies on exploits and version-specific code, making it somewhat unreliable. Additionally, the ~20KB total size limit still applies.
  2. Build your code into an application instead of a program. An application is an official format, requiring no exploits or anything else unreliable, and can be as large as can fit into ROM. Depending upon the calculator model and other stuff in ROM, this could be as low as perhaps 32KB or as high as about 1.5MB. However, you have to jump through extra hoops when designing an application. You will need to make proper use of the macros defined in a file like app.inc. The application's data will be unmodifiable, so any data or code that needs to be modified will need to be allocated in RAM somewhere. System calls that accept data such as a string will not work if the data is inside of the application. And probably most annoying, only one 16KB segment of your application will be accessible at a time. Accessing code or data on other pages requires custom page switching handlers or the OS B_CALL system. And, perhaps most important for you based on your post history, SourceCoder does not currently support building an application.
  3. Optimize your program!
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement