language-65asm/grammars/65c02-opcodes.cson
2018-03-22 22:03:41 +01:00

34 lines
796 B
Plaintext

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