]> git.sur5r.net Git - cc65/commitdiff
Fixed the generation of the opcode byte when BRK is given an operand, in 65816 CPU...
authorGreg King <gregdk@users.sf.net>
Fri, 17 Aug 2018 03:51:04 +0000 (23:51 -0400)
committerGreg King <gregdk@users.sf.net>
Fri, 17 Aug 2018 03:51:04 +0000 (23:51 -0400)
The bug was created by commit 7e8bb7b700572a50ed4f1e87ebeea4fd35177459.

src/ca65/instr.c

index eb005289cc44e00bfe1384f56d11606917e51cc8..912e458670994a2d108c5e9c6fc5935a39369ba6 100644 (file)
@@ -650,7 +650,7 @@ static const struct {
         { "BNE",  0x0020000, 0xd0, 0, PutPCRel8 },
         { "BPL",  0x0020000, 0x10, 0, PutPCRel8 },
         { "BRA",  0x0020000, 0x80, 0, PutPCRel8 },
-        { "BRK",  0x0000005, 0x00, 0, PutAll },
+        { "BRK",  0x0000005, 0x00, 6, PutAll },
         { "BRL",  0x0040000, 0x82, 0, PutPCRel16 },
         { "BVC",  0x0020000, 0x50, 0, PutPCRel8 },
         { "BVS",  0x0020000, 0x70, 0, PutPCRel8 },