fileTypes asm name WDC patterns include #M6502 include #M65C02 include #M65816 include #M65C02S include #hex_number include #binary_number include #decimal_number match \b(?i:BGE|BLT|CPA|DEA|INA|RET|SWA|TAD|TAS|TDA|TSA|XOR)\b name keyword.mnemonic.65816.alt match ^[A-Za-z_~][A-Za-z0-9_~]*\b name entity.name.label begin " end " name string.quoted.double begin ' end ' name string.quoted.single captures 1 name entity.name.section 2 name keyword.directive match ^([A-Za-z_~][A-Za-z0-9_~]*)\s+((?i)SECTION)\b name meta.section captures 1 name keyword.directive 2 name entity.name.module match \b((?i)MODULE)\s([A-Za-z_~][A-Za-z0-9_~]*)\b name meta.module captures 1 name keyword.directive 2 name constant.language comment eg: LONGA ON match \b((?i)EXTERNS|GLOBALS|INCDEBUG|CASE|CHKIMMED|LONGA|LONGI|SPACES|BIT7|SQUOTES|TWOCHAR|ARGCHK|MACFIRST|INCLIST|CONDLIST|MACLIST|PASS1)\s+((?i)ON|OFF)\b name meta.onoff.directive captures 1 name keyword.directive 2 name constant.language comment eg: CHIP 65816 match \b((?i)CHIP)\s+((?i)65816|65C02|W65C02S)\b name meta.chip.directive captures 1 name keyword.directive 2 name string.unquoted comment eg: CHIP 65816 match \b((?i)MESSAGE|EXIT|HEADING|NAM|TITLE|TTL|STTL|SUBTITLE|SUBTTL)\s+(.*)$ name meta.text.directive captures 1 name keyword.directive 2 name string.unquoted.path comment eg: include path... match \b((?i)APPEND|INCLUDE|INSERT)\s+([^'" \t\r\n]+) name meta.file.directive captures 1 name keyword.directive 2 name string.unquoted comment eg: string end w/ | or $ match \b((?i)ASCII|ASC)\s+([^|\r\n]+) name meta.ascii.directive captures 1 name keyword.directive 2 name string.quoted.other comment char text char match \b((?i)FCC)\s+((.)(.*?)(\3)) name meta.fcc.directive match \b(?i:APPEND|INCLUDE|INSERT|END|EXIT|MODULE|ENDMOD|SECTION|PAGE0|CODE|KDATA|DATA|UDATA|ENDS|ORG|ORIGIN|EQU|EQUAL|GEQU|DEFL|SET|VAR|EXTERN|EXTERNAL|XREF|EXTERNS|GLOBAL|PUBLIC|XDEF|GLOBALS|MESSAGE|MESSG|EFUNC|INCDEBUG)\b name keyword.directive.file match \b(?i:CASE|CHIP|CHKIMMED|COMMENT|DBREG|DPAGE|LONGA|LONGI|RADIX|SPACES)\b name keyword.directive.parsing match \b(?i:BIT7|MASK|SQUOTE|TWOCHAR|ASCII|ASC|FCC|DATE|DA|BYTE|DB|DEFB|FCB|STRING|DC|DEFW|DW|FDB|WORD|DBYTE|DL|LONG|LONGW|LWORD|BLKB|BLKW|BLKL|DEFS|DS|RMB|DSA|DSB|DSL|DSW|APWDC|FLOAT|DOUBLE)\b name keyword.directive.data match \b(?i:MACRO|END|MACEND|ARGCHK|MACFIRST|MACDELIM|MACEXIT|IFMA|IFNMA|REPT|ENDR)\b name keyword.directive.macro match \b(?i:ENDC|ENDIF|COND|IF|IFN?(FALSE|TRUE|Z|ABS|REL|DEF|DIFF|SAME|EXT|PAGE0)|ELSE|IF(LONG|SHORT)[AI]|IFMATCH)\b name keyword.directive.conditional match \b(?i:PL|PW|TOP|HEADING|NAM|TITLE|TTL|STTL|SUBTITLE|SUBTTL|EJECT|PAG|PAGE|LIST|(N|NO|INC|ASC|COND|MAC|M|MN)LIST|PASS1)\b name keyword.directive.listing match ;.* name comment.line repository M6502 match \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)\b name keyword.mnemonic.6502 M65816 match \b(?i:BRL|COP|JML|JSL|MVN|MVP|PEA|PEI|PER|PHB|PHD|PHK|PLB|PLD|REP|RTL|SEP|TCD|TCS|TDC|TSC|TXY|TYX|WDM|XBA|XCE)\b name keyword.mnemonic.65816 M65816L match \b(?i:ADCL|ANDL|CMPL|EORL|LDAL|ORAL|SBCL|STAL)\b name keyword.mnemonic.65816.long M65C02 match \b(?i:BRA|PHX|PHY|PLX|PLY|STP|STZ|TRB|TSB|WAI)\b name keyword.mnemonic.65c02 M65C02S match \b(?i:BBR[0-7]|BBS[0-7]|RMB[0-7]|SMB[0-7])\b name keyword.mnemonic.65c02s binary_number match %[01]+ name constant.numeric.binary decimal_number match \b([0-9]+)\b name constant.numeric.decimal hex_number match \$[A-Fa-f0-9]+ name constant.numeric.hex octal_number match @([0-7]+)\b name constant.numeric.octal scopeName source.asm.65816.wdc uuid 1D93031D-159C-4E7C-973B-2BD5370C3397