home *** CD-ROM | disk | FTP | other *** search
- ; Timedecruncher AMIGA v1.0 by PHS of CCS
-
- read = $5c6d4 ; This is the end address of the crunched file
- lowwr = $30000 ; This is the start adress of the uncrunched file
-
- start:
- lea read,a0
- lea lowwr,a1
- move.l -(a0),a2
- add.l a1,a2
- move.l -(a0),d0
-
- notfinished:
- moveq #3,d1
- bsr.L rdd1bits
- tst.b d2
- beq.S nextcmd1
- cmp.w #$7,d2
- bne.S smalljmp
- lsr.l #1,d0
- bne.S notempty1
- bsr.L getnextlwd
- notempty1:
- bcc.S midjmp
- moveq #10,d1
- bsr.L rdd1bits
- tst.w d2
- bne.S smalljmp
- moveq #18,d1
- bsr.L rdd1bits
- bra.S smalljmp
- midjmp:
- moveq #4,d1
- bsr.L rdd1bits
- addq.w #7,d2
-
- smalljmp:
- subq.w #1,d2
- getd2chr:
- moveq #7,d1
-
- get8bits:
- lsr.l #1,d0
- beq.S empty3
- roxl.l #1,d3
- dbf d1,get8bits
- move.b d3,-(a2)
- dbf d2,getd2chr
- bra.S nextcmd1
- empty3:
- move.l -(a0),d0
- move.w #$10,ccr
- roxr.l #1,d0
- roxl.l #1,d3
- dbf d1,get8bits
- move.b d3,-(a2)
- dbf d2,getd2chr
-
- nextcmd1:
- cmp.l a2,a1
- bge.S end
-
- cmd2:
- moveq #2,d1
- bsr.L rdd1bits
- moveq #2,d3
- moveq #8,d1
- tst.w d2
- beq.S dodupl
- moveq #4,d3
- cmp.w #%10,d2
- beq.S bigoff
- moveq #3,d3
- cmp.w #%01,d2
- beq.S smalloff
- moveq #2,d1
- bsr.S rdd1bits
- cmp.w #3,d2
- beq.S biglength
- cmp.w #%10,d2
- beq.S sevlength
- addq.w #5,d2
- move.w d2,d3
- bra.S bigoff
- sevlength:
- moveq #2,d1
- bsr.S rdd1bits
- addq.w #7,d2
- move.w d2,d3
- bra.S bigoff
- biglength:
- moveq #8,d1
- bsr.S rdd1bits
- move.w d2,d3
- bra.S bigoff
- smalloff:
- moveq #8,d1
- lsr.l #1,d0
- bne.S notempty2
- bsr.S getnextlwd
- notempty2:
- bcs.S dodupl
- moveq #14,d1
- bra.S dodupl
- bigoff:
- moveq #16,d1
- lsr.l #1,d0
- bne.S notempty3
- bsr.S getnextlwd
- notempty3:
- bcc.S dodupl
- moveq #8,d1
- lsr.l #1,d0
- bne.S notempty4
- bsr.S getnextlwd
- notempty4:
- bcs.S dodupl
- moveq #12,d1
-
- dodupl:
- bsr.S rdd1bits
- subq #1,d3
-
- copynextbyte:
- move.b -1(a2,d2.L),-(a2)
- dbf d3,copynextbyte
-
- nextcmd2:
- bra.L notfinished
- end:
- rts
-
- getnextlwd:
- move.l -(a0),d0
- move.w #$10,ccr
- roxr.l #1,d0
- rts
-
- rdd1bits:
- subq.w #1,d1
- clr.l d2
-
- getbits:
- lsr.l #1,d0
- beq.S empty
- roxl.l #1,d2
- dbf d1,getbits
- rts
-
- empty:
- move.l -(a0),d0
- move.w #$10,ccr
- roxr.l #1,d0
- roxl.l #1,d2
- dbf d1,getbits
- rts
-
- ;Written by PHS of CCS
-
- ;Hakan Sundell
- ;C. C. S.
- ;Sweden
-
- ;This cruncher is much better than bytekiller v1.2,and faster!