From: Greg King Date: Sun, 12 Feb 2017 19:54:57 +0000 (-0500) Subject: Fixed ca65's BRK instruction encoding for the 65816. X-Git-Tag: V2.16~45^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=refs%2Fpull%2F380%2Fhead;p=cc65 Fixed ca65's BRK instruction encoding for the 65816. BRK is two bytes on all 6502 variants; but, the 65816's maker declared officially that assemblers should support an optional operand. --- diff --git a/src/ca65/instr.c b/src/ca65/instr.c index 5e7904992..53d3573a6 100644 --- a/src/ca65/instr.c +++ b/src/ca65/instr.c @@ -650,7 +650,7 @@ static const struct { { "BNE", 0x0020000, 0xd0, 0, PutPCRel8 }, { "BPL", 0x0020000, 0x10, 0, PutPCRel8 }, { "BRA", 0x0020000, 0x80, 0, PutPCRel8 }, - { "BRK", 0x0000001, 0x00, 0, PutAll }, + { "BRK", 0x0000005, 0x00, 0, PutAll }, { "BRL", 0x0040000, 0x82, 0, PutPCRel16 }, { "BVC", 0x0020000, 0x50, 0, PutPCRel8 }, { "BVS", 0x0020000, 0x70, 0, PutPCRel8 },