From 435e15723959c605cf1fed35559f4b817abbe055 Mon Sep 17 00:00:00 2001 From: Emmanuel Marty Date: Sat, 8 Jun 2019 23:59:34 +0200 Subject: [PATCH] Save 3 more bytes --- asm/6502/decompress_v1.asm | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/asm/6502/decompress_v1.asm b/asm/6502/decompress_v1.asm index a922752..81e91a1 100755 --- a/asm/6502/decompress_v1.asm +++ b/asm/6502/decompress_v1.asm @@ -28,8 +28,7 @@ ; 3. This notice may not be removed or altered from any source distribution. ; ----------------------------------------------------------------------------- -OFFSLO = $43 ; zero-page location for temp offset -OFFSHI = $44 +OFFSHI = $43 ; zero-page location for temp offset DECOMPRESS_LZSA1 LDY #$00 @@ -117,12 +116,11 @@ GETMATCH_DONE GET_LONG_OFFSET ; handle 16 bit offset: JSR GETLARGESRC ; grab low 8 bits in X, high 8 bits in A - STX OFFSLO ; store final match offset - STA OFFSHI + STA OFFSHI ; store high 8 bits of offset + TXA CLC ; add dest + match offset - LDA PUTDST+1 ; low 8 bits - ADC OFFSLO + ADC PUTDST+1 ; low 8 bits STA COPY_MATCH_LOOP+1 ; store back reference address LDA OFFSHI ; high 8 bits