]> git.sur5r.net Git - cc65/blobdiff - src/ca65/instr.c
Fixed the order in which the 65816's block-move instructions' operands are written...
[cc65] / src / ca65 / instr.c
index 37217203a5217ff79e256a69c55a1ccde6eec366..8d1e967054a6211a8f863b3dd375e7a7055b5663 100644 (file)
@@ -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 <destination> <source>.
+    */
     EmitByte (Expression ());
+    EmitByte (Arg1);
 }