Save 2 bytes in 8088 decompressor

This commit is contained in:
emmanuel-marty 2019-04-02 13:21:45 +02:00
parent 8b992bb33a
commit 06396f5ba6

View File

@ -34,12 +34,11 @@ lzsa_decompress:
push di ; remember decompression offset
cld ; make string operations (lods, movs, stos..) move forward
lodsw ; grab first 2 bytes of block size
mov dx,ax ; keep block size in dx
mov bp,ax ; keep block size in dx
lodsb ; grab last byte of block size / compression flag
test al,al ; if the compressed data is larger than 65,535 bytes, or if it is uncompressed, bail
jne .done_decompressing
add dx,si ; point at the end of the compressed data
mov bp,dx ; remember it
add bp,si ; point at the end of the compressed data
xor cx,cx