mirror of
https://github.com/cc65/cc65.git
synced 2024-12-27 15:29:46 +00:00
optional BRK signature on all 6502 CPUs, not just 65816 (also COP)
This commit is contained in:
parent
a299ef4210
commit
cd8fa39066
@ -181,7 +181,7 @@ static const struct {
|
||||
{ "BMI", 0x0020000, 0x30, 0, PutPCRel8 },
|
||||
{ "BNE", 0x0020000, 0xd0, 0, PutPCRel8 },
|
||||
{ "BPL", 0x0020000, 0x10, 0, PutPCRel8 },
|
||||
{ "BRK", 0x0000001, 0x00, 0, PutAll },
|
||||
{ "BRK", 0x0000005, 0x00, 6, PutAll },
|
||||
{ "BVC", 0x0020000, 0x50, 0, PutPCRel8 },
|
||||
{ "BVS", 0x0020000, 0x70, 0, PutPCRel8 },
|
||||
{ "CLC", 0x0000001, 0x18, 0, PutAll },
|
||||
@ -252,7 +252,7 @@ static const struct {
|
||||
{ "BMI", 0x0020000, 0x30, 0, PutPCRel8 },
|
||||
{ "BNE", 0x0020000, 0xd0, 0, PutPCRel8 },
|
||||
{ "BPL", 0x0020000, 0x10, 0, PutPCRel8 },
|
||||
{ "BRK", 0x0000001, 0x00, 0, PutAll },
|
||||
{ "BRK", 0x0000005, 0x00, 6, PutAll },
|
||||
{ "BVC", 0x0020000, 0x50, 0, PutPCRel8 },
|
||||
{ "BVS", 0x0020000, 0x70, 0, PutPCRel8 },
|
||||
{ "CLC", 0x0000001, 0x18, 0, PutAll },
|
||||
@ -342,7 +342,7 @@ static const struct {
|
||||
{ "BNE", 0x0020000, 0xd0, 0, PutPCRel8 },
|
||||
{ "BPL", 0x0020000, 0x10, 0, PutPCRel8 },
|
||||
{ "BRA", 0x0020000, 0x12, 0, PutPCRel8 }, /* DTV */
|
||||
{ "BRK", 0x0000001, 0x00, 0, PutAll },
|
||||
{ "BRK", 0x0000005, 0x00, 6, PutAll },
|
||||
{ "BVC", 0x0020000, 0x50, 0, PutPCRel8 },
|
||||
{ "BVS", 0x0020000, 0x70, 0, PutPCRel8 },
|
||||
{ "CLC", 0x0000001, 0x18, 0, PutAll },
|
||||
@ -418,7 +418,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, 6, PutAll },
|
||||
{ "BVC", 0x0020000, 0x50, 0, PutPCRel8 },
|
||||
{ "BVS", 0x0020000, 0x70, 0, PutPCRel8 },
|
||||
{ "CLC", 0x0000001, 0x18, 0, PutAll },
|
||||
@ -510,7 +510,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, 6, PutAll },
|
||||
{ "BVC", 0x0020000, 0x50, 0, PutPCRel8 },
|
||||
{ "BVS", 0x0020000, 0x70, 0, PutPCRel8 },
|
||||
{ "CLC", 0x0000001, 0x18, 0, PutAll },
|
||||
@ -622,7 +622,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, 6, PutAll },
|
||||
{ "BSR", 0x0040000, 0x63, 0, PutPCRel4510 },
|
||||
{ "BVC", 0x0020000, 0x50, 0, PutPCRel8 },
|
||||
{ "BVS", 0x0020000, 0x70, 0, PutPCRel8 },
|
||||
@ -756,7 +756,7 @@ static const struct {
|
||||
{ "CLI", 0x0000001, 0x58, 0, PutAll },
|
||||
{ "CLV", 0x0000001, 0xb8, 0, PutAll },
|
||||
{ "CMP", 0x0b8f6fc, 0xc0, 0, PutAll },
|
||||
{ "COP", 0x0000004, 0x02, 6, PutAll },
|
||||
{ "COP", 0x0000005, 0x02, 6, PutAll },
|
||||
{ "CPA", 0x0b8f6fc, 0xc0, 0, PutAll }, /* == CMP */
|
||||
{ "CPX", 0x0c0000c, 0xe0, 1, PutAll },
|
||||
{ "CPY", 0x0c0000c, 0xc0, 1, PutAll },
|
||||
@ -909,7 +909,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, 6, PutAll },
|
||||
{ "BSR", 0x0020000, 0x44, 0, PutPCRel8 },
|
||||
{ "BVC", 0x0020000, 0x50, 0, PutPCRel8 },
|
||||
{ "BVS", 0x0020000, 0x70, 0, PutPCRel8 },
|
||||
|
36
test/asm/listing/109-brk-signature.s
Normal file
36
test/asm/listing/109-brk-signature.s
Normal file
@ -0,0 +1,36 @@
|
||||
; test of optional signature byte for BRK on all 6502-derived CPUs
|
||||
; and also COP on 65C816
|
||||
|
||||
.setcpu "6502"
|
||||
brk ; 1 byte
|
||||
brk 0 ; 2 bytes
|
||||
brk $60 ; 2 bytes
|
||||
|
||||
.setcpu "6502X"
|
||||
brk
|
||||
brk $60
|
||||
|
||||
.setcpu "6502DTV"
|
||||
brk
|
||||
brk $60
|
||||
|
||||
.setcpu "65SC02"
|
||||
brk
|
||||
brk $60
|
||||
|
||||
.setcpu "65816"
|
||||
brk
|
||||
brk $60
|
||||
cop
|
||||
cop $60
|
||||
; WDM is a NOP that gives +2 PC, probably not useful to make its signature byte optional
|
||||
;wdm
|
||||
wdm $60
|
||||
|
||||
.setcpu "4510"
|
||||
brk
|
||||
brk $60
|
||||
|
||||
.setcpu "HuC6280"
|
||||
brk
|
||||
brk $60
|
BIN
test/asm/listing/ref/109-brk-signature.bin-ref
Normal file
BIN
test/asm/listing/ref/109-brk-signature.bin-ref
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user