language-65asm/grammars/65c02-opcodes.cson

34 lines
796 B
Plaintext
Raw Normal View History

2018-03-22 17:08:30 +00:00
# Extends the basic 6502 instruction set with the 65c02 opcodes
# NOTE: rmb, bbr, smb, bbs not supported
2018-03-20 19:54:24 +00:00
scopeName: 'source.65c02-opcodes'
2018-03-20 19:54:24 +00:00
patterns: [
# The basic 6502 instruction set
{
include: 'source.6502-opcodes'
}
2018-03-22 17:08:30 +00:00
# The added 65c02 opcodes
2018-03-20 19:54:24 +00:00
{
include: '#mnemonics-65c02'
}
]
# Respository starts here -----------------------------------------------------
repository:
2018-03-22 17:08:30 +00:00
# 65c02 instruction set extension
2018-03-20 19:54:24 +00:00
'mnemonics-65c02':
patterns: [
# mnemonics
{
match: '\\b(?i:BRA|PHX|PHY|PLX|PLY|STP|STZ|TRB|TSB|WAI)\\b'
name: 'keyword.mnemonic.65c02.65c02-opcodes'
}
2018-03-22 21:03:41 +00:00
# additional opcodes for WDC chips
{
match: '\\b(?i:(BBR|BBS|RMB|SMB)[0-7])\\b'
name: 'keyword.mnemonic.65c02.65c02-opcodes'
}
2018-03-20 19:54:24 +00:00
]