-2 bytes and faster 6809 LZSA1 depacker

This commit is contained in:
Emmanuel Marty 2020-06-19 12:49:46 +02:00 committed by GitHub
parent e253d3e628
commit c3b111cea6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
; unlzsa1.s - 6809 decompression routine for raw LZSA1 - 121 bytes
; unlzsa1.s - 6809 decompression routine for raw LZSA1 - 119 bytes
; compress with lzsa -r <original_file> <compressed_file>
;
; in: x = start of compressed data
@ -59,8 +59,7 @@ lz1cpylt lda ,u+ ; copy literal byte
bne lz1cpylt ; loop until all literal bytes are copied
tfr u,x
lz1nolt puls b ; restore token
pshs b ; save it again
lz1nolt ldb ,s ; get token again, don't pop it from the stack
tstb ; test O bit (small or large offset)
bmi lz1bigof