From d27664036dbafe209ae0cf92ca0e2ac9efa718e5 Mon Sep 17 00:00:00 2001 From: uz Date: Sat, 15 Aug 2009 10:14:04 +0000 Subject: [PATCH] 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 --- src/cc65/coptptrload.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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);