Last active
          November 3, 2022 15:33 
        
      - 
      
- 
        Save JettMonstersGoBoom/dd89a7d0bbe99d5d20aed6a15972ea3c to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | filetype: "6502 asm" | |
| detect: | |
| filename: "\\.(S|s|asm)$" | |
| rules: | |
| ## Instructions | |
| # 6502 | |
| - statement: "\\b(?i)(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)(?-i)\\b" | |
| # illegals | |
| - statement: "\\b(?i)(ALR|ANC|ANE|ARR|DCP|ISC|LAS|LAX|LXA|RLA|RRA|SAX|SBX|SHA|SHX|SHY|SLO|SRE|TAS|USBC|JAM|DOP|TOP|KIL|HLT|XAS|SHS|ASO|SXA|XAS|AHX|AXA|AXS|LAR|DCM|XAA|ASR)(?-i)\\b" | |
| # 65C02 | |
| - statement: "\\b(?i)(PHX|PHY|PLX|PLY|INA|DEA|TRB|TSB|RMB|SMB|BBR|BBS|STZ)(?-i)\\b" | |
| # Hu6820 | |
| - statement: "\\b(?i)(BSR|BRA|CLX|CLY|CSH|RMB0|RMB1|RMB2|RMB3|RMB4|RMB5|RMB6|RMB7|SMB0|SMB1|SMB2|SMB3|SMB4|SMB5|SMB6|SMB7|SET|SXY|ST0|ST1|ST2|TMA|TAM|TRB|TII|TDD|TIN|TIA|TAI|TST)(?-i)\\b" | |
| ## Constants | |
| # Number - it works | |
| - constant.number: "#?\\$[0-9a-fA-F]+" | |
| - constant.number: "#?\\$[0-9a-fA-F]+" | |
| - constant.number: "#%?\\$[0-9a-fA-F]+" | |
| - constant.number: "#?$[0-9a-fA-F]+" | |
| - constant.number: "#?%[0-1]+" | |
| - constant.number: "%[0-1]+" | |
| - constant.number: "(\\b([1-9][0-9]*|0[0-7]*|0[Xx][0-9A-Fa-f]+|0[Bb][01]+)([Uu]?[Ll][Ll]?|[Ll][Ll]?[Uu]?)?\\b)" | |
| - symbol.brackets: "[(){}]|\\[|\\]" | |
| ## Other | |
| - preproc: "\\b(?i)(return|enum|align|eval|function|var|byte|word|label|const|import|binary|source|struct|fill|lohifill|do|segment|start|startAfter|name|segments|file|if|for|macro|pseudocommand|importonce|getType)(?-i)\\b" | |
| - statement: "\\b(?i)(AT_NONE|AT_ABSOLUTE|AT_ABSOLUTEX|AT_ABSOLUTEY|AT_IMMEDIATE|AT_INDIRECT|AT_IZEROPAGEX|AT_IZEROPAGEY)(?-i)\\b" | |
| - constant.string: | |
| start: "\"" | |
| end: "\"" | |
| rules: | |
| - todo: "(TODO|XXX|FIXME):?" | |
| # - constant.specialChar: "\\\\." | |
| - comment: | |
| start: "//" | |
| end: "$" | |
| rules: | |
| - todo: "(TODO|XXX|FIXME):?" | |
| - comment: | |
| start: "/\\*" | |
| end: "\\*/" | |
| rules: | |
| - todo: "(TODO|XXX|FIXME):?" | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment