wok diff plop/stuff/unzx0.S @ rev 25726
renamed xfce4-ristretto to ristretto
author | Hans-G?nter Theisgen |
---|---|
date | Sat Aug 17 17:30:48 2024 +0100 (2 months ago) |
parents | a794ec0a6495 |
children | 1b965c2713aa |
line diff
1.1 --- a/plop/stuff/unzx0.S Sat Aug 26 15:51:29 2023 +0000 1.2 +++ b/plop/stuff/unzx0.S Sat Aug 17 17:30:48 2024 +0100 1.3 @@ -40,11 +40,9 @@ 1.4 // 3. This notice may not be removed or altered from any source distribution. 1.5 1.6 zx0_decompress: 1.7 - cld // make string operations go forward 1.8 movb $0x80, %al // initialize empty bit queue 1.9 // plus bit to roll into carry 1.10 - stc 1.11 - sbb BX, BX // initialize rep-offset to 1 1.12 + movw $-1, BX // initialize rep-offset to 1 1.13 1.14 .literals: 1.15 #if !defined(FLAT16) && !defined(FLAT32) 1.16 @@ -68,9 +66,9 @@ 1.17 #if !defined(FLAT16OUT) && !defined(FLAT32) 1.18 jmp .copy_match 1.19 .fix_di: 1.20 - subw $256, %di 1.21 + subw $256*64, %di 1.22 movw %es, %dx 1.23 - addw $16, %dx 1.24 + addw $16*64, %dx 1.25 movw %dx, %es 1.26 .copy_match: 1.27 cmpw $-32640, %di // assume 32639 max window 1.28 @@ -99,11 +97,12 @@ 1.29 je .done // exit if EOD marker 1.30 1.31 movb %cl, %bh // transfer negative high byte into bh 1.32 + xchgw %ax, %bx 1.33 + lodsb // read low byte of offset + 1 bit of len 1.34 + xchgw %ax, %bx 1.35 movw $1, %cx // initialize match length value to 1 1.36 - movb (%si), %bl // read low byte of offset + 1 bit of len 1.37 - incw %si // inc instruction keep carry set 1.38 // set high bit that is shifted into bit 15 1.39 - rcrw $1, %bx // shift len bit into carry/offset in place 1.40 + rcrw %cl, %bx // shift len bit into carry/offset in place 1.41 call .elias_bt // if len bit is set, no need for more 1.42 // else read rest of elias-encoded match length 1.43 incw %cx // fix match length