File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change 1+ ;Unpacks text / characters / combined 8 bit values. Instead of letting color waste the high byte of each character,
2+ ;use it to store another character.
3+ ;This unpacks the high byte, and then the low byte into 2 words.
4+ ;This essentially allows twice the amount of stored text per amount of RAM
5+ ;Color is blank 0's (in the high bit), and must be added after unpacking.
6+ ;Register a is the start of the packed
7+ ;data. Register b is the end of the
8+ ;packed data. Register c is the start
9+ ;of where you want to unpack to
10+ ;Copyright 2012, by Hotrootsoup, licensed unter the GNU Public License.
11+ ;http://www.gnu.org/licenses/gpl.txt
12+
13+ :upack
14+ set PUSH, [a]
15+ shr PEEK, 8
16+ set [c], POP
17+
18+ add c, 1
19+
20+ set PUSH, [a]
21+ and PEEK, 0x00FF
22+ set [c], POP
23+
24+ ife a, b
25+ set PC, POP
26+
27+ add c, 1
28+ add a, 1
29+ set PC, upack
You can’t perform that action at this time.
0 commit comments