Remove unnecessary "ADDB #$12" as B register will always have this value from 6809 LZSA depackers

This commit is contained in:
Doug Masten 2020-06-20 12:19:32 -05:00
parent f233d552ca
commit 1dd65731c4
4 changed files with 4 additions and 8 deletions

View File

@ -78,8 +78,7 @@ lz1gotof leau d,y ; put backreference start address in U (dst+offset)
cmpb #$12 ; MATCH_RUN_LEN?
bne lz1gotln ; no, we have the full match length, go copy
ldb ,x+ ; grab extra match length byte
addb #$12 ; add MIN_MATCH_SIZE + MATCH_RUN_LEN
addb ,x+ ; add extra match length byte + MIN_MATCH_SIZE + MATCH_RUN_LEN
bcc lz1gotln ; if no overflow, we have the full length
bne lz1midln

View File

@ -82,8 +82,7 @@ lz1gotof nega ; reverse sign of offset in D
cmpb #$12 ; MATCH_RUN_LEN?
bne lz1gotln ; no, we have the full match length, go copy
ldb ,-x ; grab extra match length byte
addb #$12 ; add MIN_MATCH_SIZE + MATCH_RUN_LEN
addb ,-x ; add extra match length byte + MIN_MATCH_SIZE + MATCH_RUN_LEN
bcc lz1gotln ; if no overflow, we have the full length
bne lz1midln

View File

@ -40,8 +40,7 @@ lz2token ldb ,x+ ; load next token into B: XYZ|LL|MMM
cmpb #$12 ; LITERALS_RUN_LEN_V2 + 15 ?
bne lz2gotlt ; if not, we have the full literals count, go copy
ldb ,x+ ; load extra literals count byte
addb #$12 ; add LITERALS_RUN_LEN + 15
addb ,x+ ; add extra literals count byte + LITERALS_RUN_LEN + 15
bcc lz2gotlt ; if no overflow, we got the complete count, copy
ldb ,x+ ; load low 8 bits of little-endian literals count

View File

@ -42,8 +42,7 @@ lz2token ldb ,-x ; load next token into B: XYZ|LL|MMM
cmpb #$12 ; LITERALS_RUN_LEN_V2 + 15 ?
bne lz2gotlt ; if not, we have the full literals count, go copy
ldb ,-x ; load extra literals count byte
addb #$12 ; add LITERALS_RUN_LEN + 15
addb ,-x ; add extra literals count byte + LITERALS_RUN_LEN + 15
bcc lz2gotlt ; if no overflow, we got the complete count, copy
ldd ,--x ; load 16 bit count in D (low part in B, high in A)