From 99db30a732f781acfb6243ac9804d4bee2d2c833 Mon Sep 17 00:00:00 2001 From: Doug Masten Date: Fri, 26 Jun 2020 15:18:53 -0500 Subject: [PATCH] Optimize handling of 9 bits offset in 6809 LZSA2 depacker --- asm/6809/unlzsa2.s | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/asm/6809/unlzsa2.s b/asm/6809/unlzsa2.s index 51f74a2..f2f4247 100644 --- a/asm/6809/unlzsa2.s +++ b/asm/6809/unlzsa2.s @@ -76,10 +76,8 @@ lz2nolt ldb ,s ; get token again, don't pop it from the stack lda #$ff ; set bits 8-15 of offset bra lz2gotof -lz2offs9 clra ; clear A (to prepare for high 8 bits of offset) - lslb ; push token's Z flag bit into carry - rola ; shift Z flag from carry into bit 0 of A - coma ; set bits 9-15 of offset, reverse bit 8 +lz2offs9 sex ; extend token's Z flag bit into reg A + deca ; set bits 9-15 of offset, reverse bit 8 ldb ,x+ ; load low 8 bits of (negative, signed) offset bra lz2gotof