From 111403c052e4f57da020aff54f3ad1ac8b2511a0 Mon Sep 17 00:00:00 2001 From: Peter Ferrie Date: Sun, 7 Jul 2019 12:05:02 -0700 Subject: [PATCH] a little more --- asm/8088/decompress_small_v1.S | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/asm/8088/decompress_small_v1.S b/asm/8088/decompress_small_v1.S index 45591a4..ddb9196 100755 --- a/asm/8088/decompress_small_v1.S +++ b/asm/8088/decompress_small_v1.S @@ -92,17 +92,13 @@ lzsa1_decompress: lodsw ; grab 16-bit length test ax,ax ; bail if we hit EOD - jne short .got_matchlen - -.done_decompressing: - pop ax ; retrieve the original decompression offset - xchg ax,di ; compute decompressed size - sub ax,di - ret ; done + je short .done_decompressing + db 81H ; mask inc ah/lodsb + ; (*like jmp short .got_literals but faster) .mid_matchlen: - lodsb ; grab single extra length byte inc ah ; add 256 + lodsb ; grab single extra length byte .got_matchlen: xchg cx,ax ; copy match length into cx @@ -116,3 +112,9 @@ lzsa1_decompress: xchg si,ax ; restore ds:si pop ds jmp short .decode_token ; go decode another token + +.done_decompressing: + pop ax ; retrieve the original decompression offset + xchg ax,di ; compute decompressed size + sub ax,di + ret ; done