From: uz Date: Sat, 15 Aug 2009 10:14:04 +0000 (+0000) Subject: Change order of replacement code in OptPtrLoad10 to allow detection in other X-Git-Tag: V2.13.0rc1~246 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d27664036dbafe209ae0cf92ca0e2ac9efa718e5;p=cc65 Change order of replacement code in OptPtrLoad10 to allow detection in other steps. git-svn-id: svn://svn.cc65.org/cc65/trunk@4009 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/cc65/coptptrload.c b/src/cc65/coptptrload.c index dd9925aae..4ecfa9926 100644 --- a/src/cc65/coptptrload.c +++ b/src/cc65/coptptrload.c @@ -927,9 +927,9 @@ unsigned OptPtrLoad10 (CodeSeg* S) * * and replace it by: * - * ldy ... * stx ptr1+1 * sta ptr1 + * ldy ... * ldx #$00 * lda (ptr1),y * @@ -957,11 +957,11 @@ unsigned OptPtrLoad10 (CodeSeg* S) /* Store the high byte */ X = NewCodeEntry (OP65_STA, AM65_ZP, "ptr1", 0, L[0]->LI); - CS_InsertEntry (S, X, I+1); + CS_InsertEntry (S, X, I); /* Store the low byte */ X = NewCodeEntry (OP65_STX, AM65_ZP, "ptr1+1", 0, L[0]->LI); - CS_InsertEntry (S, X, I+2); + CS_InsertEntry (S, X, I+1); /* Delete the call to ldauidx */ CS_DelEntry (S, I+3);