Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Syntax Highlighting for Sublime Text 2 with 6502 Assembly.
# [PackageDev] target_format: plist, ext: tmLanguage
---
name: Asm.6502
scopeName: source.6502
fileTypes: [asm, s]
uuid: 86149a15-e3cd-4960-b54c-bc801015f7d4
patterns:
- comment: Preprocessor
name: entity.name.function.preprocessor.asm
match: ^#.*$
- comment: Directive
name: entity.name.function.preprocessor.asm
match: \.(asc|dsb|byt|text|data)
- comment: Label
name: support.type.asm
match: ^(\s*[a-zA-Z][a-zA-Z0-9_]*:)
- comment: Operation
name: keyword.mnemonic
match: \b(adc|and|asl|bcc|bcs|beq|bit|bmi|bne|bpl|brk|bvc|bvs|clc|cld|cli|clv|cmp|cpx|cpy|dec|dex|dey|eor|inc|inx|iny|jmp|jsr|lda|ldx|ldy|lsr|nop|ora|pha|php|pla|plp|rol|ror|rti|rts|sbc|sec|sed|sei|sta|stx|sty|tax|tay|tsx|txa|txs|tya)\b
- comment: Hexadecimal Literal
name: constant.numeric.hexadecimal
match: (#?\$[0-9A-Fa-f]+)
- comment: Decimal Literal
name: constant.numeric.decimal
match: ((\b|#)[0-9]+)
- comment: String Literal
name: string.quoted.asm
begin: \"
end: (([^\\])|(\\\\))\"
- comment: Multi-line Comment
name: comment.block
begin: \/\*
end: \*\/
- comment: Single-line Comment
name: comment.line
match: ;[^:]+
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.