1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-25 02:29:52 +00:00

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.
This commit is contained in:
Greg King 2018-06-15 11:01:14 -04:00
parent cc5c0931a3
commit eeb1b927ce

View 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);
}