From b4fda62df9ca500cc835fedfd11ae270a2edc517 Mon Sep 17 00:00:00 2001 From: uz Date: Sat, 15 Aug 2009 16:00:30 +0000 Subject: [PATCH] clc should always be the insn before adc. git-svn-id: svn://svn.cc65.org/cc65/trunk@4020 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/cc65/coptadd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cc65/coptadd.c b/src/cc65/coptadd.c index 0315022f8..6a4002823 100644 --- a/src/cc65/coptadd.c +++ b/src/cc65/coptadd.c @@ -63,8 +63,8 @@ unsigned OptAdd1 (CodeSeg* S) * * ldy #xx-1 * lda (sp),y - * clc * ldy #yy-3 + * clc * adc (sp),y * pha * ldy #xx @@ -108,13 +108,13 @@ unsigned OptAdd1 (CodeSeg* S) X = NewCodeEntry (OP65_LDA, AM65_ZP_INDY, "sp", 0, L[1]->LI); CS_InsertEntry (S, X, I+1); - /* clc */ - X = NewCodeEntry (OP65_CLC, AM65_IMP, 0, 0, L[5]->LI); - CS_InsertEntry (S, X, I+2); - /* ldy #yy-3 */ Arg = MakeHexArg (L[3]->Num - 3); X = NewCodeEntry (OP65_LDY, AM65_IMM, Arg, 0, L[4]->LI); + CS_InsertEntry (S, X, I+2); + + /* clc */ + X = NewCodeEntry (OP65_CLC, AM65_IMP, 0, 0, L[5]->LI); CS_InsertEntry (S, X, I+3); /* adc (sp),y */ -- 2.39.5