mirror of
https://github.com/cc65/cc65.git
synced 2025-04-13 06:37:20 +00:00
allow immedite style syntax variation for BRK signature byte
This commit is contained in:
parent
3f8252311e
commit
3d41a5b516
@ -445,6 +445,7 @@ byte. If omitted, the assembler will only produce only 1 byte.
|
||||
<tscreen><verb>
|
||||
brk ; 1-byte: $00
|
||||
brk $34 ; 2-bytes: $00 $34
|
||||
brk #$34 ; 2-bytes: $00 $34
|
||||
</verb></tscreen>
|
||||
|
||||
|
||||
|
@ -181,7 +181,7 @@ static const struct {
|
||||
{ "BMI", 0x0020000, 0x30, 0, PutPCRel8 },
|
||||
{ "BNE", 0x0020000, 0xd0, 0, PutPCRel8 },
|
||||
{ "BPL", 0x0020000, 0x10, 0, PutPCRel8 },
|
||||
{ "BRK", 0x0000005, 0x00, 6, PutAll },
|
||||
{ "BRK", 0x0800005, 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", 0x0000005, 0x00, 6, PutAll },
|
||||
{ "BRK", 0x0800005, 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", 0x0000005, 0x00, 6, PutAll },
|
||||
{ "BRK", 0x0800005, 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", 0x0000005, 0x00, 6, PutAll },
|
||||
{ "BRK", 0x0800005, 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", 0x0000005, 0x00, 6, PutAll },
|
||||
{ "BRK", 0x0800005, 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", 0x0000005, 0x00, 6, PutAll },
|
||||
{ "BRK", 0x0800005, 0x00, 6, PutAll },
|
||||
{ "BSR", 0x0040000, 0x63, 0, PutPCRel4510 },
|
||||
{ "BVC", 0x0020000, 0x50, 0, PutPCRel8 },
|
||||
{ "BVS", 0x0020000, 0x70, 0, PutPCRel8 },
|
||||
@ -747,7 +747,7 @@ static const struct {
|
||||
{ "BNE", 0x0020000, 0xd0, 0, PutPCRel8 },
|
||||
{ "BPL", 0x0020000, 0x10, 0, PutPCRel8 },
|
||||
{ "BRA", 0x0020000, 0x80, 0, PutPCRel8 },
|
||||
{ "BRK", 0x0000005, 0x00, 6, PutAll },
|
||||
{ "BRK", 0x0800005, 0x00, 6, PutAll },
|
||||
{ "BRL", 0x0040000, 0x82, 0, PutPCRel16 },
|
||||
{ "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", 0x0000005, 0x02, 6, PutAll },
|
||||
{ "COP", 0x0800005, 0x02, 6, PutAll },
|
||||
{ "CPA", 0x0b8f6fc, 0xc0, 0, PutAll }, /* == CMP */
|
||||
{ "CPX", 0x0c0000c, 0xe0, 1, PutAll },
|
||||
{ "CPY", 0x0c0000c, 0xc0, 1, PutAll },
|
||||
@ -833,7 +833,7 @@ static const struct {
|
||||
{ "TYA", 0x0000001, 0x98, 0, PutAll },
|
||||
{ "TYX", 0x0000001, 0xbb, 0, PutAll },
|
||||
{ "WAI", 0x0000001, 0xcb, 0, PutAll },
|
||||
{ "WDM", 0x0000004, 0x42, 6, PutAll },
|
||||
{ "WDM", 0x0800004, 0x42, 6, PutAll },
|
||||
{ "XBA", 0x0000001, 0xeb, 0, PutAll },
|
||||
{ "XCE", 0x0000001, 0xfb, 0, PutAll }
|
||||
}
|
||||
@ -909,7 +909,7 @@ static const struct {
|
||||
{ "BNE", 0x0020000, 0xd0, 0, PutPCRel8 },
|
||||
{ "BPL", 0x0020000, 0x10, 0, PutPCRel8 },
|
||||
{ "BRA", 0x0020000, 0x80, 0, PutPCRel8 },
|
||||
{ "BRK", 0x0000005, 0x00, 6, PutAll },
|
||||
{ "BRK", 0x0800005, 0x00, 6, PutAll },
|
||||
{ "BSR", 0x0020000, 0x44, 0, PutPCRel8 },
|
||||
{ "BVC", 0x0020000, 0x50, 0, PutPCRel8 },
|
||||
{ "BVS", 0x0020000, 0x70, 0, PutPCRel8 },
|
||||
|
@ -5,32 +5,41 @@
|
||||
brk ; 1 byte
|
||||
brk 0 ; 2 bytes
|
||||
brk $60 ; 2 bytes
|
||||
brk #$60 ; 2 bytes
|
||||
|
||||
.setcpu "6502X"
|
||||
brk
|
||||
brk $60
|
||||
brk #$60
|
||||
|
||||
.setcpu "6502DTV"
|
||||
brk
|
||||
brk $60
|
||||
brk #$60
|
||||
|
||||
.setcpu "65SC02"
|
||||
brk
|
||||
brk $60
|
||||
brk #$60
|
||||
|
||||
.setcpu "65816"
|
||||
brk
|
||||
brk $60
|
||||
brk #$60
|
||||
cop
|
||||
cop $60
|
||||
cop #$60
|
||||
; WDM is a NOP that gives +2 PC, probably not useful to make its signature byte optional
|
||||
;wdm
|
||||
wdm $60
|
||||
wdm #$60
|
||||
|
||||
.setcpu "4510"
|
||||
brk
|
||||
brk $60
|
||||
brk #$60
|
||||
|
||||
.setcpu "HuC6280"
|
||||
brk
|
||||
brk $60
|
||||
brk #$60
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user