mirror of
https://github.com/emmanuel-marty/lzsa.git
synced 2024-09-26 20:55:50 +00:00
smaller
This commit is contained in:
parent
e85cb8a5bb
commit
15c9059adf
@ -76,15 +76,16 @@ lzsa2_decompress:
|
|||||||
; 5 bit offset
|
; 5 bit offset
|
||||||
cmp dl,020H ; test bit 5
|
cmp dl,020H ; test bit 5
|
||||||
call .get_nibble_x
|
call .get_nibble_x
|
||||||
dec ah ; set offset bits 15-8 to 1
|
jmp short .dec_offset_top
|
||||||
jmp short .get_match_length
|
|
||||||
|
|
||||||
.offset_9_bit: ; 9 bit offset
|
.offset_9_bit: ; 9 bit offset
|
||||||
lodsb ; get 8 bit offset from stream in A
|
lodsb ; get 8 bit offset from stream in A
|
||||||
dec ah ; set offset bits 15-8 to 1
|
dec ah ; set offset bits 15-8 to 1
|
||||||
test dl,020H ; test bit Z (offset bit 8)
|
test dl,020H ; test bit Z (offset bit 8)
|
||||||
je .get_match_length
|
je .get_match_length
|
||||||
|
.dec_offset_top:
|
||||||
dec ah ; clear bit 8 if Z bit is clear
|
dec ah ; clear bit 8 if Z bit is clear
|
||||||
|
; or set offset bits 15-8 to 1
|
||||||
jmp short .get_match_length
|
jmp short .get_match_length
|
||||||
|
|
||||||
.rep_match_or_large_offset:
|
.rep_match_or_large_offset:
|
||||||
@ -97,17 +98,18 @@ lzsa2_decompress:
|
|||||||
xchg ah,al
|
xchg ah,al
|
||||||
call .get_nibble_x
|
call .get_nibble_x
|
||||||
sub al,2 ; substract 512
|
sub al,2 ; substract 512
|
||||||
xchg ah,al
|
jmp short .get_match_length_1
|
||||||
lodsb ; load match offset bits 0-7
|
|
||||||
jmp short .get_match_length
|
|
||||||
|
|
||||||
.rep_match_or_16_bit:
|
.rep_match_or_16_bit:
|
||||||
test dl,020H ; test bit Z (offset bit 8)
|
test dl,020H ; test bit Z (offset bit 8)
|
||||||
jne .repeat_match ; rep-match
|
jne .repeat_match ; rep-match
|
||||||
|
|
||||||
; 16 bit offset
|
; 16 bit offset
|
||||||
lodsw ; Get 2-byte match offset
|
lodsb ; Get 2-byte match offset
|
||||||
|
|
||||||
|
.get_match_length_1:
|
||||||
xchg ah,al
|
xchg ah,al
|
||||||
|
lodsb ; load match offset bits 0-7
|
||||||
|
|
||||||
.get_match_length:
|
.get_match_length:
|
||||||
xchg bp,ax ; bp: offset
|
xchg bp,ax ; bp: offset
|
||||||
|
Loading…
Reference in New Issue
Block a user