mirror of
https://github.com/emmanuel-marty/lzsa.git
synced 2025-04-06 20:37:12 +00:00
Simplify nibble handling in LZSA2 8088 depacker
This commit is contained in:
parent
8b7b4a2b4f
commit
d70830b525
@ -35,7 +35,7 @@ lzsa2_decompress:
|
||||
cld ; make string operations (lods, movs, stos..) move forward
|
||||
|
||||
xor cx,cx
|
||||
xor bx,bx
|
||||
mov bx,0100H
|
||||
xor bp,bp
|
||||
|
||||
.decode_token:
|
||||
@ -157,14 +157,12 @@ lzsa2_decompress:
|
||||
ret ; done
|
||||
|
||||
.get_nibble:
|
||||
dec bh ; nibble ready?
|
||||
neg bh ; nibble ready?
|
||||
jns .has_nibble
|
||||
|
||||
mov cx,ax
|
||||
xchg bx,ax
|
||||
lodsb ; load two nibbles
|
||||
mov bl,al
|
||||
mov bh,1
|
||||
mov ax,cx
|
||||
xchg ax,bx
|
||||
|
||||
.has_nibble:
|
||||
mov cl,4 ; swap 4 high and low bits of nibble
|
||||
|
Loading…
x
Reference in New Issue
Block a user