Is there any way (romcall) to check if there is enough memory free in the archive?

I want to bypass an occasional error generated from Arc_Unarc when archiving an object while there isn't enough room for it.
I usually use _ChkFreeArc, aka bcall($5014), which returns the 32-bit value of the number of free archive bytes.

http://wikiti.brandonw.net/index.php?title=83Plus:BCALLs:5014
Thanks a lot, KermMartian!
cerzus69 wrote:
Thanks a lot, KermMartian!
Sure thing, I hope it helps you! It's definitely a good idea to check free ROM before you archive and free RAM before you unarchive.
I do do a RAM check before creating the AppVar or unarchiving it.
The documentation on _Arc_Unarc said it will throw an error if it can't archive the object you want it to, but I don't get any; it just leaves it unarchived Confused but when I use _ChkFreeArc before archinving with _Arc_Unarc, sometimes it locks up, so I ended up not using it at all.
Whoa, really? That sounds to me like something else may be wrong, because I don't think I've ever had a problem with lockups. Sad
KermMartian wrote:
Whoa, really? That sounds to me like something else may be wrong, because I don't think I've ever had a problem with lockups. Sad


Must've been an error in my coding. It is working okay now.
cerzus69 wrote:
KermMartian wrote:
Whoa, really? That sounds to me like something else may be wrong, because I don't think I've ever had a problem with lockups. Sad


Must've been an error in my coding. It is working okay now.
Excellent, good to hear. Smile I'm curious what the problem was, though.
Too late, I'm afraid. All record of the state of the program at that moment is lost forever...
cerzus69 wrote:
Too late, I'm afraid. All record of the state of the program at that moment is lost forever...
Oh well, the important thing is that it works now, and this topic still exists for other people who are trying to find out the amount of free archive on their calculator.
  
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