Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
f89a766cbc
10
README.md
10
README.md
|
@ -2,14 +2,16 @@
|
|||
|
||||
Adds syntax highlighting to 65816/65C816/65802/6502/65C02 files in Atom, with extra support for various compilers:
|
||||
|
||||
- [cc65](http://oliverschmidt.github.io/cc65/)
|
||||
- [ACME Crossassembler](https://sourceforge.net/projects/acme-crossass/)
|
||||
- [cc65 (SNES Syntax: 65816, SPC700, SuperFX)](http://oliverschmidt.github.io/cc65/)
|
||||
- [DASM](http://dasm-dillon.sourceforge.net/) (6502)
|
||||
- EDASM
|
||||
- [EDASM](https://archive.org/details/EDASM-ProDOS_Assembler_Tools_Manual)
|
||||
- [Merlin](http://en.wikipedia.org/wiki/Merlin_(assembler))
|
||||
- [MPW IIgs Assembler](http://store.16sector.com/index.php?main_page=product_info&products_id=24)
|
||||
- [NinjaForce Assembler](http://www.ninjaforce.com/html/products_nf_assembler.html)
|
||||
- [ORCA/M](http://www.byteworks.us/Byte_Works/Products.html)
|
||||
- [WLA-DX](http://www.villehelin.com/wla.html)
|
||||
- [WTCTools by Western Design Center](http://westerndesigncenter.com/wdc/tools.cfm)
|
||||
|
||||
Originally [converted](http://atom.io/docs/latest/converting-a-text-mate-bundle)
|
||||
from the various other TextMate bundles:
|
||||
|
@ -42,7 +44,7 @@ config.cson (`ctrl+shift+p` -> config):
|
|||
}
|
||||
```
|
||||
|
||||
See first line in grammar files for names.
|
||||
See last line in grammar files for names.
|
||||
|
||||
# Contributors
|
||||
|
||||
|
@ -50,3 +52,5 @@ See first line in grammar files for names.
|
|||
- [Matt Tuttle](https://github.com/MattTuttle)
|
||||
- [Tommy Savaria](https://github.com/NewLunarFire)
|
||||
- [ARM9](https://github.com/ARM9)
|
||||
- [georgjz](https://github.com/georgjz)
|
||||
- [GoDot](http://www.godot64.de/)
|
||||
|
|
|
@ -25,4 +25,9 @@ repository:
|
|||
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'
|
||||
}
|
||||
]
|
||||
|
|
|
@ -0,0 +1,103 @@
|
|||
# Syntax Highlighting for the acme directives
|
||||
|
||||
scopeName: 'source.assembly.6502.acme'
|
||||
name: 'ACME Crossassembler'
|
||||
filetypes: [
|
||||
'a'
|
||||
'asm'
|
||||
]
|
||||
|
||||
patterns: [
|
||||
{ include: 'source.6502-opcodes' }
|
||||
{ include: 'source.6502x-opcodes' }
|
||||
{ include: '#comments' }
|
||||
# symbols, constants, numbers
|
||||
{ include: '#symbols' }
|
||||
# directives
|
||||
{ include: '#directives' }
|
||||
]
|
||||
|
||||
# Repository starts here ------------------------------------------------------
|
||||
|
||||
repository:
|
||||
# comments
|
||||
comments:
|
||||
patterns: [
|
||||
# semicolon comments
|
||||
{
|
||||
match: ';.*$'
|
||||
name: 'comment.line.semicolon.acme'
|
||||
}
|
||||
]
|
||||
|
||||
# symbols
|
||||
symbols:
|
||||
patterns: [
|
||||
# strings
|
||||
{
|
||||
begin: '"'
|
||||
beginCaptures:
|
||||
0:
|
||||
name: 'punctuation.definition.string.begin.acme'
|
||||
end: '"'
|
||||
endCaptures:
|
||||
0:
|
||||
name: 'punctuation.definition.string.end.acme'
|
||||
name: 'string.quoted.double.assembly.acme'
|
||||
}
|
||||
# absolut addressing/numbering
|
||||
{
|
||||
match: '\\#(\'.\'|[^\\s\']+)'
|
||||
name: 'constant.numeric.hex.acme'
|
||||
}
|
||||
# hex, prefixed with dollar ($)
|
||||
{
|
||||
match: '-?\\$[A-Fa-f0-9]+'
|
||||
name: 'constant.numeric.hex.acme'
|
||||
}
|
||||
# binary prefixed with %
|
||||
{
|
||||
match: '%[01]+'
|
||||
name: 'constant.numeric.binary.acme'
|
||||
}
|
||||
# decimal
|
||||
{
|
||||
match: '\\b([0-9]+)\\b'
|
||||
name: 'constant.numeric.decimal.acme'
|
||||
}
|
||||
]
|
||||
|
||||
# assembler directives
|
||||
directives:
|
||||
patterns: [
|
||||
# File and Symbol control
|
||||
{
|
||||
match: '\\b\!(?i:source|src|eof|endoffile|pseudopc|zn|zone|set|to|bin(ary)?|sl|warn|error|serious)\\b'
|
||||
name: 'support.function.pseudo.acme'
|
||||
}
|
||||
# Parsing control
|
||||
{
|
||||
match: '\\b\!(?i:cpu|al|as|rl|rs|8|by|byte|16|wo|word|24|32|h|hex|fi|fill|align|skip|ct|convtab|tx|text|pet|scr|scrxor|raw)\\b'
|
||||
name: 'support.function.pseudo.acme'
|
||||
}
|
||||
# Macro control
|
||||
{
|
||||
match: '\\b(?i:\!macro|\+[a-zA-Z0-9)\\b'
|
||||
name: 'support.function.pseudo.acme'
|
||||
}
|
||||
# Conditional control
|
||||
{
|
||||
match: '\\b(?i:\!if|else|\!if(n)?def|\!for|\!do|while|until)\\b'
|
||||
name: 'keyword.control.conditional.acme'
|
||||
}
|
||||
# Operators
|
||||
{
|
||||
match: '!|\\+|\\-|\\/|\\*|<<|>>|&|\\||\\^|=|<|>|\\:|\\|\\|'
|
||||
name: 'keyword.operator.acme'
|
||||
}
|
||||
# Operators II
|
||||
{
|
||||
match: '\\b(?i:and|not|mod|sh[lr]|x?or|eq|u?[gl]t)\\b'
|
||||
name: 'keyword.operator.acme'
|
||||
}
|
||||
]
|
|
@ -3,7 +3,6 @@
|
|||
scopeName: 'source.cc65-directives'
|
||||
|
||||
patterns: [
|
||||
# comments
|
||||
{
|
||||
include: '#comments'
|
||||
}
|
||||
|
|
|
@ -0,0 +1,122 @@
|
|||
# Syntax Highlighting for the Western Design Center toolchain directives
|
||||
|
||||
scopeName: 'source.wdc-directives'
|
||||
|
||||
patterns: [
|
||||
{
|
||||
include: '#comments'
|
||||
}
|
||||
# symbols, constants, numbers
|
||||
{
|
||||
include: '#symbols'
|
||||
}
|
||||
# directives
|
||||
{
|
||||
include: '#directives'
|
||||
}
|
||||
]
|
||||
|
||||
# Repository starts here ------------------------------------------------------
|
||||
repository:
|
||||
|
||||
# comments
|
||||
comments:
|
||||
patterns: [
|
||||
# semicolon comments
|
||||
{
|
||||
match: ';.*$'
|
||||
name: 'comment.line.semicolon.wdc-toolchain'
|
||||
}
|
||||
]
|
||||
|
||||
# symbols
|
||||
symbols:
|
||||
patterns: [
|
||||
# strings
|
||||
{
|
||||
begin: '"'
|
||||
beginCaptures:
|
||||
0:
|
||||
name: 'punctuation.definition.string.begin.wdc-toolchain'
|
||||
end: '"'
|
||||
endCaptures:
|
||||
0:
|
||||
name: 'punctuation.definition.string.end.wdc-toolchain'
|
||||
name: 'string.quoted.double.assembly.wdc-toolchain'
|
||||
}
|
||||
# absolut addressing/numbering
|
||||
{
|
||||
match: '\\#(\'.\'|[^\\s\']+)'
|
||||
name: 'constant.numeric.hex.wdc-toolchain'
|
||||
}
|
||||
# hex, prefixed with ampersand($)
|
||||
{
|
||||
match: '-?\\$[A-Fa-f0-9]+'
|
||||
name: 'constant.numeric.hex.wdc-toolchain'
|
||||
}
|
||||
# hex, suffixed with h(h)
|
||||
{
|
||||
match: '-?([0-9]+)h'
|
||||
name: 'constant.numeric.hex.wdc-toolchain'
|
||||
}
|
||||
# binary prefixed with %
|
||||
{
|
||||
match: '%[01]+'
|
||||
name: 'constant.numeric.binary.wdc-toolchain'
|
||||
}
|
||||
# binary suffixed with B
|
||||
{
|
||||
match: '[01]+(?i:b)'
|
||||
name: 'constant.numeric.binary.wdc-toolchain'
|
||||
}
|
||||
# octal and decimal
|
||||
{
|
||||
match: '\\b([0-9]+(d|o|q)?)\\b'
|
||||
name: 'constant.numeric.decimal.wdc-toolchain'
|
||||
}
|
||||
]
|
||||
|
||||
# assembler directives
|
||||
directives:
|
||||
patterns: [
|
||||
# File and Symbol control
|
||||
{
|
||||
match: '\\b(?i:append|include|insert|end(s|mod)?|exit|module|section|org|origin|equ(al)?|gequ|defl|set|var|extern(al|s)?|xref|globals?|public|xdef|message|messg|efunc|incdebug)\\b'
|
||||
name: 'support.function.pseudo.wdc-toolchain'
|
||||
}
|
||||
# Parsing control
|
||||
{
|
||||
match: '\\b(?i:case|chip|chkimmed|comment|dbreg|dpage|long[ai]|radix|spaces|llchar|bit7|mask|squote|twochar|asc(ii)?|fcc|date|da|d?byte|d(ef)?b|fcb|string|dc|d(ef)?w|fdb|l?word|dl|longw?|blk[blw]|defs|ds(a|b|l|w)?|rmb|apwdc|float|double)\\b'
|
||||
name: 'support.function.pseudo.wdc-toolchain'
|
||||
}
|
||||
# Macro control
|
||||
{
|
||||
match: '\\b(?i:macro|endm|macend|argchk|macfirst|macdelim|macexit|ifma|ifnma|rept|endr)\\b'
|
||||
name: 'support.function.pseudo.wdc-toolchain'
|
||||
}
|
||||
# Conditional control
|
||||
{
|
||||
match: '\\b(?i:end(c|if)?|cond|ifn?(false|true|z|abs|rel|def|diff|same|ext|page0)?|if(long|short)[ai]|ifmatch|else)\\b'
|
||||
name: 'keyword.control.conditional.wdc-toolchain'
|
||||
}
|
||||
# Listing control
|
||||
{
|
||||
match: '\\b(?i:pl|pw|top|heading|nam|title|s?ttl|subtitle|subttl|eject|page?|(no?)?list|(inc|asc|cond|m(ac)?|mn)list|pass1)\\b'
|
||||
name: 'support.function.pseudo.wdc-toolchain'
|
||||
}
|
||||
# Pre-defined sections
|
||||
{
|
||||
match: '\\b(?i:page0|code|(k|u)?data)\\b'
|
||||
name: 'constant.other.wdc-toolchain'
|
||||
}
|
||||
# Operators
|
||||
{
|
||||
match: '!|\\+|\\-|\\/|\\*|<<|>>|&|\\||\\^|=|<|>|\\:|\\|\\|'
|
||||
name: 'keyword.operator.wdc-toolchain'
|
||||
}
|
||||
# Operators II
|
||||
{
|
||||
match: '\\b(?i:and|not|mod|sh[lr]|x?or|eq|u?[gl]t)\\b'
|
||||
name: 'keyword.operator.wdc-toolchain'
|
||||
}
|
||||
]
|
|
@ -0,0 +1,14 @@
|
|||
# Syntax Highlighting for the Western Design Center toolchain and 6502 support
|
||||
# TODO: extra addressing modes, chip point prefix, * comments
|
||||
|
||||
scopeName: 'source.wdc-toolchain'
|
||||
name: '6502 Assembly (WDCTools)' # Name shown in Atom Editor grammar selection
|
||||
# File extensions associated with this grammar
|
||||
fileTypes: [
|
||||
's'
|
||||
]
|
||||
# include all opcodes and directives the toolchain supports
|
||||
patterns: [
|
||||
{ include: 'source.65c02-opcodes' } # the 65c02 opcodes, includes the basic 6502 instruction set
|
||||
{ include: 'source.wdc-directives' } # include the directives of the WDCxAS assemblers
|
||||
]
|
|
@ -0,0 +1,14 @@
|
|||
# Syntax Highlighting for the Western Design Center toolchain and 65816 support
|
||||
|
||||
scopeName: 'source.wdc816-toolchain'
|
||||
name: '65816 Assembly (WDCTools)' # Name shown in Atom Editor grammar selection
|
||||
# File extensions associated with this grammar
|
||||
fileTypes: [
|
||||
's'
|
||||
]
|
||||
# include all opcodes and directives the toolchain supports
|
||||
patterns: [
|
||||
{ include: 'source.65816-opcodes' } # the 65c02 opcodes, includes the basic 65c02 instruction set
|
||||
{ include: 'source.65816-aliases' } # Opcode aliases for the 65816
|
||||
{ include: 'source.wdc-directives' } # include the directives of the WDCxAS assemblers
|
||||
]
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"name": "language-65asm",
|
||||
"version": "5.0.0",
|
||||
"version": "6.1.0",
|
||||
"description": "Adds syntax highlighting to 65816/65C816/65802/6502/65C02 files in Atom, with extra support for various compilers.",
|
||||
"repository": "https://github.com/MatthewCallis/language-65asm",
|
||||
"repository": "git@github.com:MatthewCallis/language-65asm.git",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"atom": ">0.50.0"
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
# '.source.assembly':
|
||||
# 'editor':
|
||||
# 'commentStart': ';'
|
||||
# '.source.assembly.6502.edasm':
|
||||
# 'editor':
|
||||
# 'foldEndPattern': '\\b(?i:DEND|FIN)\\b'
|
||||
# '.source.assembly.65816.mpw':
|
||||
# 'editor':
|
||||
# 'foldEndPattern': '\\b(?i:ENDF|ENDFUNC|ENDI|ENDP|ENDPROC|ENDR|ENDSTACK|ENDWITH|ENDM|ENDMACRO|MEND)\\b'
|
||||
# '.source.assembly.65816.merlin':
|
||||
# 'editor':
|
||||
# 'foldEndPattern': '\\b(?i:DEND|FIN)\\b|<<<|--\\^'
|
||||
# '.source.assembly.65816.ninjaforce':
|
||||
# 'editor':
|
||||
# 'foldEndPattern': '(\\^\\^\\^|\\<\\<\\<)'
|
||||
# '.source.assembly.65816.orcam':
|
||||
# 'editor':
|
||||
# 'foldEndPattern': '\\b(?i:END)\\b'
|
||||
'.source.assembly':
|
||||
'editor':
|
||||
'commentStart': ';'
|
||||
'.source.assembly.6502.edasm':
|
||||
'editor':
|
||||
'foldEndPattern': '\\b(?i:DEND|FIN)\\b'
|
||||
'.source.assembly.65816.mpw':
|
||||
'editor':
|
||||
'foldEndPattern': '\\b(?i:ENDF|ENDFUNC|ENDI|ENDP|ENDPROC|ENDR|ENDSTACK|ENDWITH|ENDM|ENDMACRO|MEND)\\b'
|
||||
'.source.assembly.65816.merlin':
|
||||
'editor':
|
||||
'foldEndPattern': '\\b(?i:DEND|FIN)\\b|<<<|--\\^'
|
||||
'.source.assembly.65816.ninjaforce':
|
||||
'editor':
|
||||
'foldEndPattern': '(\\^\\^\\^|\\<\\<\\<)'
|
||||
'.source.assembly.65816.orcam':
|
||||
'editor':
|
||||
'foldEndPattern': '\\b(?i:END)\\b'
|
||||
|
|
Loading…
Reference in New Issue