From 4dec1490885457b9c863d8e367db3847233d8c1d Mon Sep 17 00:00:00 2001 From: ARM9 Date: Thu, 23 Mar 2017 15:24:11 +0100 Subject: [PATCH] Add cc65 SNES grammar, installation instructions SNES grammar including 65816, spc700 and superfx assembly. --- README.md | 24 ++++++++++++++++++++++++ grammars/SNES Assembly (cc65).cson | 9 +++------ 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index d38bb1f..57d678e 100755 --- a/README.md +++ b/README.md @@ -20,6 +20,30 @@ from the various other TextMate bundles: Contributions are greatly appreciated! Please fork this repository and open a pull request to add snippets, make grammar tweaks, etc. +# Installation + +In atom, press `ctrl+shift+p` and enter `install package`, then type `language-65asm` into the search bar and hit install. + +#### OR + +Run `apm install language-65asm` in a terminal. + +To add automatic syntax highlighting to a set of file extensions, add this to your +config.cson (`ctrl+shift+p` -> config): + +``` +"*": + core: + customFileTypes: { + "source.assembly.6502.cc65": [ + "asm" + "inc" + ] + } +``` + +See last line in grammar files for names. + # Contributors - [Matthew Callis](https://github.com/MatthewCallis) diff --git a/grammars/SNES Assembly (cc65).cson b/grammars/SNES Assembly (cc65).cson index b490550..6abf000 100644 --- a/grammars/SNES Assembly (cc65).cson +++ b/grammars/SNES Assembly (cc65).cson @@ -1,7 +1,4 @@ -'fileTypes': [ - 'asm', - 'inc' -] +'fileTypes': [] 'name': 'SNES Assembly (cc65)' 'patterns': [ { @@ -82,7 +79,7 @@ 'name': 'keyword.operator.assembly.cc65' # http://oliverschmidt.github.io/cc65/doc/ca65.html#toc5.5 } { - 'match': '(\\.)\\b(?i:and|bankbyte|bitand|bitnot|bitor|bitxor|hibyte|lobyte|mod|not|or|shl|shr|xor)\\b' + 'match': '(\\.)\\b(?i:and|bankbyte|bitand|bitnot|bitor|bitxor|mod|not|or|shl|shr|xor)\\b' 'name': 'keyword.operator.assembly.cc65' # http://oliverschmidt.github.io/cc65/doc/ca65.html#toc5.5 } ] @@ -100,7 +97,7 @@ 'match': '\\b(?i:BRA|PHX|PHY|PLX|PLY|STP|STZ|TRB|TSB|WAI)\\b' 'name': 'keyword.mnemonic.65c02' 'MSuperFX': - '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|POPB|PUSH|PUSHB|RAMB|RET|ROL|ROMB|ROR|RPIX|SBC|SBK|SEX|SM|SMS|STB|STOP|STW|SUB|SWAP|TO|UMULT|WITH|XOR)\\b' + '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' 'MSPC700': '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'