I made these simple utilities for a Zelda clone/fan game I'm working on, and I thought they might be useful in other BASIC programs. Be aware that it overwrites the following variables: L1, L2, A, B, C

They are designed to compress (RLECMP) and extract (RLEEXT) lists using a simple Run-Length Encoding algorithm.

NOTE: Due to a minor bug I haven't been able to track (it doesn't appear to be off-by-one incrementing, as the associated fix causes a dimension error), the compression routine skips the last element of the list it's compressing. Extraction faces no such issues. My current workaround is to repeat the last element before compressing, but a true fix would be greatly appreciated.

SYNTAX: Both utilities accept their input list in ANS (so I can call them with "L1:prgmRLECMP" and "L1:prgmRLEEXT"). The result is stored to ANS after compression. "999" is added to the beginning of the compressed list so programs can easily detect whether it is actually compressed.

https://drive.google.com/open?id=1sW2v05BPCMSNTguKnbD2Bho1ygAVNlwD
The Google Drive link returns a 404 error. Could you please either update it or upload the RLE things to the Cemeetch Archives? Thanks!
  
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