Skip to content

Instantly share code, notes, and snippets.

@daumiller
Created January 4, 2014 05:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daumiller/8252082 to your computer and use it in GitHub Desktop.
Save daumiller/8252082 to your computer and use it in GitHub Desktop.
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