From 69e3bbea7eba3c97802cf8fa94f581432ee5300c Mon Sep 17 00:00:00 2001 From: Greg King Date: Tue, 7 Feb 2017 07:33:27 -0500 Subject: [PATCH] Reverted 'Used more mundane addressing in some of the instructions in "zlib/inflatemem.s".' This reverted some of commit e7e65044e607f15b7d5b4e55abf7cdcb123993a8. --- libsrc/zlib/inflatemem.s | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/libsrc/zlib/inflatemem.s b/libsrc/zlib/inflatemem.s index ea550c074..b3a0510c5 100644 --- a/libsrc/zlib/inflatemem.s +++ b/libsrc/zlib/inflatemem.s @@ -1,10 +1,15 @@ ; ; 2003-09-21, Piotr Fusik -; 2016-07-19, Greg King +; 2017-02-07, Greg King ; ; unsigned __fastcall__ inflatemem (char* dest, const char* source); ; +; Two "lda (0,x)" instructions can't be assembled for the PC-Engine library +; because an implied ".setdp $2000" changes $00 into a non-zero-page address. +; Therefore, this file isn't assembled for that target. +.ifndef __PCE__ + .export _inflatemem .import incsp2 @@ -139,8 +144,8 @@ inflateCopyBlock: ldy #1 sty getBit_hold ; Get 16-bit length - ldx #0 - lda (inputPointer,x) + ldx #inputPointer + lda (0,x) sta moveBlock_len lda (inputPointer),y sta moveBlock_len+1 @@ -165,15 +170,15 @@ moveBlock: .endif inc moveBlock_len+1 moveBlock_1: - lda (inputPointer,x) + lda (0,x) .if (.cpu & CPU_ISET_65SC02) sta (outputPointer) .else sta (outputPointer),y .endif - inc inputPointer + inc 0,x bne moveBlock_2 - inc inputPointer+1 + inc 1,x moveBlock_2: inc outputPointer bne moveBlock_3 @@ -671,3 +676,5 @@ bitsPointer_h: ; Sorted codes. sortedCodes: .res 256+1+29+30+2 + +.endif -- 2.39.5