What's a foolproof (and preferably not exceedingly large) method to determine the first free application page on an 83+ or 84+? Importantly, such a method also needs to determine if there are no free application pages left.
Runer112 wrote:
What's a foolproof (and preferably not exceedingly large) method to determine the first free application page on an 83+ or 84+? Importantly, such a method also needs to determine if there are no free application pages left.
The first free page has 0xFF as the lowest byte in the page. When you reach page 0x0C, going downwards from high pages, you're out of room.
KermMartian wrote:
Runer112 wrote:
What's a foolproof (and preferably not exceedingly large) method to determine the first free application page on an 83+ or 84+? Importantly, such a method also needs to determine if there are no free application pages left.
The first free page has 0xFF as the lowest byte in the page. When you reach page 0x0C, going downwards from high pages, you're out of room.


Kerm, how do you make sure you don't share a sector with variables? Just round down to the sector start and make sure it's also $FF?
calc84maniac wrote:
KermMartian wrote:
Runer112 wrote:
What's a foolproof (and preferably not exceedingly large) method to determine the first free application page on an 83+ or 84+? Importantly, such a method also needs to determine if there are no free application pages left.
The first free page has 0xFF as the lowest byte in the page. When you reach page 0x0C, going downwards from high pages, you're out of room.


Kerm, how do you make sure you don't share a sector with variables? Just round down to the sector start and make sure it's also $FF?
I would think that would be a reasonable assumption. That's what I use in jsTIfied, anyway.

Edit: Runer, documentation that might help you:
http://wikiti.brandonw.net/index.php?title=83Plus:OS:Variable_Storage_in_the_User_Archive
You will need to be careful that a multi-page app doesn't have one of its pages start with an FF, though. In BatLib, I searched for the page size field of the app and skipped a number of pages, accordingly until the first page with an $FF as the first byte (or the first page without an app header).
Xeda112358 wrote:
You will need to be careful that a multi-page app doesn't have one of its pages start with an FF, though. In BatLib, I searched for the page size field of the app and skipped a number of pages, accordingly until the first page with an $FF as the first byte (or the first page without an app header).
Indeed, that's important to do, since the non-first pages of Apps can start with anything. Smile I believe I actually remember seeing a glitch to this effect in PindurTI when I was exploring its source.
  
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