mirror of
https://github.com/MatthewCallis/language-65asm.git
synced 2025-02-19 17:30:47 +00:00
Add SPC-700 and SuperFX opcodes
This commit is contained in:
parent
194a96a3cd
commit
d7c010e8aa
@ -9,6 +9,8 @@ patterns: [
|
||||
{ include: 'source.65816-opcodes' }
|
||||
{ include: 'source.65816l-opcodes' }
|
||||
{ include: 'source.65816alt-opcodes' }
|
||||
{ include: 'source.spc700-opcodes' }
|
||||
{ include: 'source.superfx-opcodes' }
|
||||
{ include: '#comments' }
|
||||
{ include: '#symbols' }
|
||||
{ include: '#directives' }
|
||||
@ -189,7 +191,7 @@ repository:
|
||||
}
|
||||
# operators
|
||||
{
|
||||
match: '[-+/*^><|#\\[\\](),=.!&]'
|
||||
match: '[-+/*^><|#\\[\\]()=.!&]'
|
||||
name: 'keyword.operator.asar'
|
||||
}
|
||||
# TODO: Add built-in functions
|
||||
|
29
grammars/spc700-opcodes.cson
Normal file
29
grammars/spc700-opcodes.cson
Normal file
@ -0,0 +1,29 @@
|
||||
# Opcodes for the Sony SPC-700 audio processing unit used in the SNES
|
||||
|
||||
scopeName: 'source.spc700-opcodes'
|
||||
|
||||
patterns: [
|
||||
# The SPC700 instruction set aliases
|
||||
{
|
||||
include: '#mnemonics-spc700'
|
||||
}
|
||||
]
|
||||
|
||||
# Respository starts here -----------------------------------------------------
|
||||
repository:
|
||||
|
||||
# SPC700 instruction set
|
||||
'mnemonics-spc700':
|
||||
patterns: [
|
||||
# mnemonics
|
||||
{
|
||||
match: '\\b(?i:ADC|ADDW|AND|AND1|ASL|BBC|BBS|BCC|BCS|BEQ|BMI|BNE|BPL|BVC|BVS|BRA|BRK|CALL|CBNE|CLR1|CLRC|CLRP|CLRV|CMP|CMPW|DAA|DAS|DBNZ|DEC|DECW|DI|DIV|EI|EOR|EOR1|INC|INCW|JMP|LSR|MOV|MOV1|MOVW|MUL|NOP|NOT1|NOTC|OR|OR1|PCALL|POP|PUSH|RET|RETI|ROL|ROR|SBC|SET1|SETC|SETP|SLEEP|STOP|SUBW|TCALL|TCLR1|TSET1|XCN)\\b'
|
||||
name: 'keyword.mnemonic.spc700.spc700-opcodes'
|
||||
}
|
||||
# registers
|
||||
{
|
||||
match: '\\b(?i:F[0-9A-F]|SP|PC|PSW)\\b'
|
||||
name: 'support.function.pseudo.spc700-opcodes'
|
||||
# name: 'storage.other.register.spc700-opcodes'
|
||||
}
|
||||
]
|
29
grammars/superfx-opcodes.cson
Normal file
29
grammars/superfx-opcodes.cson
Normal file
@ -0,0 +1,29 @@
|
||||
# Opcodes for the SuperFX DSP used in some SNES cartridges
|
||||
|
||||
scopeName: 'source.superfx-opcodes'
|
||||
|
||||
patterns: [
|
||||
# The SPC700 instruction set aliases
|
||||
{
|
||||
include: '#mnemonics-superfx'
|
||||
}
|
||||
]
|
||||
|
||||
# Respository starts here -----------------------------------------------------
|
||||
repository:
|
||||
|
||||
# SuperFX instruction set
|
||||
'mnemonics-superfx':
|
||||
patterns: [
|
||||
# mnemonics
|
||||
{
|
||||
match: '\\b(?i:ADD|ADC|ALT1|ALT2|ALT3|AND|ASR|BCC|BCS|BEQ|BGE|BIC|BLT|BMI|BNE|BPL|BRA|BVC|BVS|CACHE|CMODE|CMP|COLOR|DEC|DIV2|FMULT|FROM|GETB|GETBH|GETBL|GETBS|GETC|HIB|IBT|INC|IWT|JAL|JMP|LDB|LDW|LEA|LINK|LJMP|LM|LMS|LMULT|LOB|LOOP|LSR|MERGE|MOVE|MOVEB|MOVES|MOVEW|MULT|NOP|NOT|OR|PLOT|POP|PUSH|RAMB|RET|ROL|ROMB|ROR|RPIX|SBC|SBK|SEX|SM|SMS|STB|STOP|STW|SUB|SWAP|TO|UMULT|WITH|XOR)\\b'
|
||||
name: 'keyword.mnemonic.superfx.superfx-opcodes'
|
||||
}
|
||||
# registers
|
||||
{
|
||||
match: '\\b(?i:R0|R1|R2|R3|R4|R5|R6|R7|R8|R9|R10|R11|R12|R13|R14|R15|SP|LR|PC|SFR|BRAMR|PBR|ROMBR|CFGR|SCBR|CLSR|SCMR|VCR|RAMBR|CBR)\\b'
|
||||
name: 'support.function.pseudo.superfx-opcodes'
|
||||
# name: 'storage.other.register.superfx-opcodes'
|
||||
}
|
||||
]
|
Loading…
x
Reference in New Issue
Block a user