1
0
mirror of https://github.com/pfusik/zlib6502.git synced 2024-06-08 13:29:27 +00:00

Optimize code by two bytes.

This commit is contained in:
Piotr Fusik 2003-03-12 01:11:24 +01:00
parent 16403f6976
commit da25b5975e

View File

@ -1,8 +1,8 @@
zpage equ $f0 ; 11 bytes zpage equ $f0 ; 11 bytes
inflate equ $b600 inflate equ $8000
* 'Inflate' * 'Inflate'
; Written by Piotr Fusik (a.k.a. Fox/Taquart) ; Written by Piotr Fusik
; Purpose: to uncompress Deflate format compressed data on 6502-based system. ; Purpose: to uncompress Deflate format compressed data on 6502-based system.
* const * const
@ -139,7 +139,7 @@ inflateDynamicBlock
jsr getBits jsr getBits
sta inflateDynamicBlock_cnt sta inflateDynamicBlock_cnt
; Get lengths of temporary codes in order stored in tempCodeLengthOrder ; Get lengths of temporary codes in order stored in tempCodeLengthOrder
lda:tay #0 txa:tay #0
inflateDynamicBlock_1 inflateDynamicBlock_1
ldx #3 ; A = 0 ldx #3 ; A = 0
jsr getBits ; does not change Y jsr getBits ; does not change Y
@ -307,7 +307,7 @@ getNextLength
jsr getBits jsr getBits
cpy #17 cpy #17
tay tay
lda #0 txa #0
bcs getNextLength_2 bcs getNextLength_2
getNextLength_1 getNextLength_1
lda getNextLength_last lda getNextLength_last