From: Greg King Date: Fri, 15 Jun 2018 15:01:14 +0000 (-0400) Subject: Fixed the order in which the 65816's block-move instructions' operands are written... X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=eeb1b927cee5fefe6910201447a23781ef4ea720;p=cc65 Fixed the order in which the 65816's block-move instructions' operands are written and assembled. The source bank number is written first; but, assembled second. The destination bank is written second; but, assembled first. --- diff --git a/src/ca65/instr.c b/src/ca65/instr.c index 37217203a..8d1e96705 100644 --- a/src/ca65/instr.c +++ b/src/ca65/instr.c @@ -1298,10 +1298,16 @@ static void PutPCRel4510 (const InsDesc* Ins) static void PutBlockMove (const InsDesc* Ins) /* Handle the blockmove instructions (65816) */ { + ExprNode* Arg1 = Expression (); + Emit0 (Ins->BaseCode); - EmitByte (Expression ()); ConsumeComma (); + + /* The operands are written in Assembly code as source, destination; + ** but, they're assembled as . + */ EmitByte (Expression ()); + EmitByte (Arg1); }