1 ;Exomizer 2 Z80 decoder
4 ; compression algorithm by Magnus Lind
7 ; hl=compressed data start
8 ; de=uncompressed destination start
10 ; you may change exo_mapbasebits to point to any free buffer
33 ld (iy+0),c ;bits[i]=b1
44 ld (iy+104),d ;base[i]=b2
55 call exo_getbit ;literal?
78 ex af,af' ;lenght in AF'
79 ld de,512+48 ;2 bits, 48 offset
84 ld de,1024+32 ;4 bits, 32 offset
97 push hl ;de=destination
105 pop hl ;Keep HL, DE is updated
106 jr exo_mainloop ;Next!
109 ld iy,exo_mapbasebits
123 ld bc,0 ;get D bits in BC
133 ld a,ixh ;get one bit
143 exo_mapbasebits_size equ 156
145 ; defs 156 ;tables for bits, baseL, baseH