diff --git a/vscode/CHANGELOG.md b/vscode/CHANGELOG.md index 9ef9ff0..72d8be7 100644 --- a/vscode/CHANGELOG.md +++ b/vscode/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.1.1 +* Converted XML to JSON as XML is the official file format of unreadability +* Added windows install batch file + ## 0.1.0 * Bunched together a shabby working version of Visual Studio Code editing of 6502 intended for assembling with x65 * Added coloring for section control \ No newline at end of file diff --git a/vscode/README.md b/vscode/README.md index e02839a..89810df 100644 --- a/vscode/README.md +++ b/vscode/README.md @@ -8,9 +8,15 @@ As I don't like the marketplaceification of seemingly simple tools I'm not putti In order to "side load" this extension into visual studio code follow these steps +Windows: + +1. Make sure Visual Studio Code is installed +2. Run vscode\install.bat + +Mac / Linux: + 1. Install Visual Studio Code unless already Installed 2. Go to the visual studio code extension folder - * Windows %USERPROFILE%\.vscode\extensions * Mac ~/.vscode/extensions * Linux ~/.vscode/extensions 3. Create a folder named x65 diff --git a/vscode/install.bat b/vscode/install.bat new file mode 100644 index 0000000..086f8e1 --- /dev/null +++ b/vscode/install.bat @@ -0,0 +1,4 @@ +@echo off +if not exist "%USERPROFILE%\.vscode\extensions\x65" mkdir %USERPROFILE%\.vscode\extensions\x65 +xcopy %~dp0*.* %USERPROFILE%\.vscode\extensions\x65 /EXCLUDE:%~dp0\install.bat /Q /Y + diff --git a/vscode/package.json b/vscode/package.json index 1837dc6..773a977 100644 --- a/vscode/package.json +++ b/vscode/package.json @@ -2,7 +2,7 @@ "name" : "x65", "displayName" : "x65", "description" : "x65 Assembler syntax", - "version" : "0.1.0", + "version" : "0.1.1", "publisher" : "x65", "icon": "x65.png", "license" : "maybe", @@ -12,14 +12,12 @@ "categories" : [ "Languages" ], - "keywords" : [ - "x65", "6502", "6510", "65816" - ], + "keywords" : ["x65", "6502", "6510", "65816" ], "contributes" : { "languages" : [ { "id" : "x65", - "aliases" : ["6502"], + "aliases" : [ "6502" ], "extensions" : [ ".s", ".i" ], "configuration" : "./x65.configuration.json" } @@ -28,14 +26,14 @@ { "language" : "x65", "scopeName" : "source.asm.6502.x65", - "path" : "./x65.tmLanguage" + "path" : "./x65.tmLanguage.json" } ], "themes" : [ { "label": "x65", "uiTheme": "vs-dark", - "path": "./x65.tmTheme" + "path": "./x65.tmTheme.json" } ] } diff --git a/vscode/x65.tmLanguage b/vscode/x65.tmLanguage deleted file mode 100644 index b26d1e1..0000000 --- a/vscode/x65.tmLanguage +++ /dev/null @@ -1,235 +0,0 @@ - - - - - fileTypes - - s - i - - name - x65 - patterns - - - include - #comments - - - include - #constants - - - include - #control - - - include - #opcodes - - - include - #quotes - - - include - #storage - - - include - #operators - - - include - #labels - - - repository - - control - - patterns - - - match - (?i)((^|\s+)(CPU|PROCESSOR|PC|ORG|LOAD|EXPORT|SECTION|SEG|SEGMENT|MERGE|LINK|INCOBJ|ALIGN|MACRO|MAC|EVAL|PRINT|ECHO|BYTE|BYTES|WORD|WORDS|LONG|DC|DV|TEXT|INCLUDE|INCBIN|IMPORT|CONST|LABEL|STRING|UNDEF|INCSYM|LABPOOL|POOL|IF|IFDEF|ELSE|ELIF|ENDIF|STRUCT|ENUM|REPT|REPEAT|INCDIR|A16|A8|XY16|XY8|I16|I8|DUMMY|DUMMY_END|DS|ABORT|ERR)|\s+ert)\b - name - directive - - - match - (?i)((^|\s+)(XDEF|XREF|SECTION|SEG|SEGMENT|MERGE|LINK|INCOBJ)|\s+ert)\b - name - control.segment - - - - opcodes - - patterns - - - match - \b(adc|and|asl|bit|clc|cld|cli|clv|cmp|cpx|cpy|dec|dex|dey|eor|inc|inx|iny|lda|ldx|ldy|lsr|nop|ora|pha|php|pla|plp|rol|ror|sbc|sec|sed|sei|sta|stx|sty|tax|txa|tay|tya|tsx|txs|ADC|AND|ASL|BIT|CLC|CLD|CLI|CLV|CMP|CPX|CPY|DEC|DEX|DEY|EOR|INC|INX|INY|LDA|LDX|LDY|LSR|NOP|ORA|PHA|PHP|PLA|PLP|ROL|ROR|SBC|SEC|SED|SEI|STA|STX|STY|TAX|TXA|TAY|TYA|TSX|TXS)\b - name - keyword.other.opcode - - - match - \b(bcc|bcs|beq|bmi|bne|bpl|brk|bvc|bvs|jmp|jsr|rti|rts|BCC|BCS|BEQ|BMI|BNE|BPL|BRK|BVC|BVS|JMP|JSR|RTI|RTS)\b - name - keyword.pc - - - match - \b(aso|rln|lse|rrd|sax|lax|dcp|isb|anc|alr|arr|ane|anx|sbx|las|sha|shs|shx|shy|npo|cim|dop|top)\b - name - keyword.other.opcode.6502.illegal - - - - comments - - patterns - - - begin - /\* - end - \*/ - name - comment.block - - - match - //.* - name - comment.line.double-slash - - - match - ;.* - name - comment.line.semicolon - - - match - ^\S*\s*(\*.*) - captures - - 1 - - name - comment.line.asterisk - - - - - - quotes - - patterns - - - begin - ' - end - ' - name - string.quoted.single - - - begin - " - end - " - name - string.quoted.double - - - - constants - - patterns - - - match - (?i)(?<=,)\s*[xy]\b(?!.*\.reg) - name - constant.language.registers - - - match - \b[0-9]+\b - name - constant.numeric.decimal - - - match - (?i)\$\b\h+\b|\b0x\h+\b - name - constant.numeric.hexadecimal - - - match - %\b[0-1]+\b - name - constant.numeric.binary - - - - storage - - patterns - - - match - (?i)(^|\s+)align\b - name - storage.modifier - - - - labels - - patterns - - - match - (?i)(^|\s+)[\!\.][a-zA-Z0-9_]+\b - name - label.local - - - match - (?i)(^|\s+)[!\!\.][a-zA-Z0-9_]+\b - name - label.global - - - match - (?i)[\!\%]\b - name - label.scope - - - - operators - - patterns - - - match - (?i)[+\-*/%!|^=~\:&<>] - name - constant.language - - - - - scopeName - source.asm.6502.x65 - uuid - 3a93182b-9647-4133-bead-cd118e3ed088 - - diff --git a/vscode/x65.tmLanguage.json b/vscode/x65.tmLanguage.json new file mode 100644 index 0000000..3a4a4c4 --- /dev/null +++ b/vscode/x65.tmLanguage.json @@ -0,0 +1,98 @@ +{ + "name": "x65", + "fileTypes": [ "s", "i" ], + "patterns": [ + { + "match": "(?i)((^|\\s+)(CPU|PROCESSOR|PC|ORG|LOAD|EXPORT|SECTION|SEG|SEGMENT|MERGE|LINK|INCOBJ|ALIGN|MACRO|MAC|EVAL|PRINT|ECHO|BYTE|BYTES|WORD|WORDS|LONG|DC.[BWTL]|DC|DV|TEXT|INCLUDE|INCBIN|IMPORT|CONST|LABEL|STRING|UNDEF|INCSYM|LABPOOL|POOL|IF|IFDEF|ELSE|ELIF|ENDIF|STRUCT|ENUM|REPT|REPEAT|INCDIR|A16|A8|XY16|XY8|I16|I8|DUMMY|DUMMY_END|DS|ABORT|ERR)|\\s+ert)\\b", + "name": "meta.directive", + "comment": "Assembler Control" + }, + { + "match": "(?i)((^|\\s+)(XDEF|XREF|SECTION|SEG|SEGMENT|MERGE|LINK|INCOBJ)|\\s+ert)\\b", + "name": "meta.segment", + "comment": "Segment Control" + }, + { + "match": "\\b(adc|and|asl|bit|clc|cld|cli|clv|cmp|cpx|cpy|dec|dex|dey|eor|inc|inx|iny|lda|ldx|ldy|lsr|nop|ora|pha|php|pla|plp|rol|ror|sbc|sec|sed|sei|sta|stx|sty|tax|txa|tay|tya|tsx|txs|ADC|AND|ASL|BIT|CLC|CLD|CLI|CLV|CMP|CPX|CPY|DEC|DEX|DEY|EOR|INC|INX|INY|LDA|LDX|LDY|LSR|NOP|ORA|PHA|PHP|PLA|PLP|ROL|ROR|SBC|SEC|SED|SEI|STA|STX|STY|TAX|TXA|TAY|TYA|TSX|TXS)\\b", + "name": "keyword.other.opcode.instruction" + }, + { + "match": + "\\b(bcc|bcs|beq|bmi|bne|bpl|brk|bvc|bvs|jmp|jsr|rti|rts|BCC|BCS|BEQ|BMI|BNE|BPL|BRK|BVC|BVS|JMP|JSR|RTI|RTS)\\b", + "name": "keyword.other.opcode.pc" + }, + { + "match": "\\b(aso|rln|lse|rrd|sax|lax|dcp|isb|anc|alr|arr|ane|anx|sbx|las|sha|shs|shx|shy|npo|cim|dop|top)\\b", + "name": "keyword.other.opcode.6502.illegal" + }, + { + "begin": "/\\*", + "end": "\\*/", + "name": "comment.block" + }, + { + "match": "//.*", + "name": "comment.line.double-slash" + }, + { + "match": ";.*", + "name": "comment.line.semicolon" + }, + { + "match": "^\\S*\\s*(\\*.*)", + "captures": { + "1": { "name": "comment.line.asterisk" } + } + }, + { + "begin": "'", + "end": "'", + "name": "string.quoted.single" + }, + { + "begin": "\"", + "end": "\"", + "name": "string.quoted.double" + }, + { + "match": "(?i)(?<=,)\\s*[xy]\\b(?!.*\\.reg)", + "name": + "constant.language.registers" + }, + { + "match": "\\b[0-9]+\\b", + "name": + "constant.numeric.decimal" + }, + { + "match": "(?i)\\$\\b\\h+\\b|\\b0x\\h+\\b", + "name": "constant.numeric.hexadecimal" + }, + { + "match": "%\\b[0-1]+\\b", + "name": "constant.numeric.binary" + }, + { + "match": "(?i)(^|\\s+)align\\b", + "name": "storage.modifier" + }, + { + "match": "(?i)(^|\\s+)[\\!\\.][a-zA-Z0-9_]+\\b", + "name": "label.local" + }, + { + "match": "(?i)(^|\\s+)[!\\!\\.][a-zA-Z0-9_]+\\b", + "name": "label.global" + }, + { + "match": "(?i)[\\!\\%]\\b", + "name": "label.scope" + }, + { + "match": "(?i)[+\\-*/%!|^=~\\:&<>;]", + "name": "constant.language" + } + ], + "scopeName": "source.asm.6502.x65", + "uuid": "3a93182b-9647-4133-bead-cd118e3ed088" +} diff --git a/vscode/x65.tmTheme b/vscode/x65.tmTheme deleted file mode 100644 index 31c95c8..0000000 --- a/vscode/x65.tmTheme +++ /dev/null @@ -1,237 +0,0 @@ - - - - - name - x65 - settings - - - settings - - background - #000048 - caret - #ffffff - foreground - #eeee88 - invisibles - #3B3A32 - lineHighlight - #40406060 - selection - #0088ff - - - - name - Comment - scope - comment - settings - - foreground - #cc44cc - - - - name - String - scope - string - settings - - foreground - #00cc55 - - - - name - SegmentControl - scope - control.segment - settings - - foreground - #a0ff80 - - - - name - Number - scope - constant.numeric - settings - - foreground - #77e0c0 - - - - name - Directive - scope - directive - settings - - foreground - #40b0ff - - - - name - Built-in constant - scope - constant.language - settings - - foreground - #c090ff - - - - name - User-defined constant - scope - constant.character, constant.other - settings - - foreground - #c0a040 - - - - name - Variable - scope - variable - settings - - foreground - #a9fdac - - - - name - Keyword - scope - keyword - settings - - foreground - #ff7979 - - - - name - Storage - scope - storage - settings - - fontStyle - - foreground - #dede79 - - - - name - LocalLabel - scope - label.local - settings - - fontStyle - - foreground - #a0c0ff - - - - name - GlobalLabel - scope - label.global - settings - - fontStyle - - foreground - #80ffa0 - - - - name - ScopeLabel - scope - label.scope - settings - - fontStyle - - foreground - #ff80a0 - - - - name - Function name - scope - entity.name.function - settings - - fontStyle - - foreground - #8cdaff - - - - name - Tag name - scope - entity.name.tag - settings - - fontStyle - - foreground - #88ddbb - - - - name - Library constant - scope - support.constant - settings - - fontStyle - - foreground - #ecfdb9 - - - - name - Invalid - scope - invalid - settings - - background - #f92649 - fontStyle - - foreground - #F8F8F0 - - - - uuid - 38b4e4f7-c037-42d5-8ccc-eda7c052d512 - colorSpaceName - sRGB - - \ No newline at end of file diff --git a/vscode/x65.tmTheme.json b/vscode/x65.tmTheme.json new file mode 100644 index 0000000..2c54a33 --- /dev/null +++ b/vscode/x65.tmTheme.json @@ -0,0 +1,138 @@ +{ + "name": "x65", + "settings": [ + { + "settings": { + "background": "#100048", + "caret": "#ffffff", + "foreground": "#eeee88", + "invisibles": "#3B3A32", + "lineHighlight": "#40406060", + "selection": "#0088ff" + } + }, + { + "name": "Comment", + "scope": "comment", + "settings": { "foreground": "#cc44cc" } + }, + { + "name": "String", + "scope": "string", + "settings": { "foreground": "#00cc55" } + }, + { + "name": "SegmentControl", + "scope": "meta.segment", + "settings": { "foreground": "#a0ff80" } + }, + { + "name": "Number", + "scope": "constant.numeric", + "settings": { "foreground": "#77e0c0" } + }, + { + "name": "Directive", + "scope": "meta.directive", + "settings": { "foreground": "#40b0ff" } + }, + { + "name": "Built-in constant", + "scope": "constant.language", + "settings": { "foreground": "#c090ff" } + }, + { + "name": "User-defined constant", + "scope": "constant.character, constant.other", + "settings": { "foreground": "#c0a040" } + }, + { + "name": "Variable", + "scope": "variable", + "settings": { "foreground": "#a9fdac" } + }, + { + "name": "Keyword", + "scope": "keyword", + "settings": { "foreground": "#79ff79" } + }, + { + "name": "Instruction", + "scope": "keyword.other.opcode", + "settings": { "foreground": "#ff7979" } + }, + { + "name": "PC Instruction", + "scope": "keyword.other.opcode.pc", + "settings": { "foreground": "#ff5979" } + }, + { + "name": "Storage", + "scope": "storage", + "settings": { + "fontStyle": "", + "foreground": "#dede79" + } + }, + { + "name": "LocalLabel", + "scope": "label.local", + "settings": { + "fontStyle": "", + "foreground": "#a0c0ff" + } + }, + { + "name": "GlobalLabel", + "scope": "label.global", + "settings": { + "fontStyle": "", + "foreground": "#80ffa0" + } + }, + { + "name": "ScopeLabel", + "scope": "label.scope", + "settings": { + "fontStyle": "", + "foreground": "#ff80a0" + } + }, + { + "name": "Function name", + "scope": "entity.name.function", + "settings": { + "fontStyle": "", + "foreground": "#8cdaff" + } + }, + { + "name": "Tag name", + "scope": "entity.name.tag", + "settings": { + "fontStyle": "", + "foreground": "#88ddbb" + } + }, + { + "name": "Library constant", + "scope": "support.constant", + "settings": { + "fontStyle": "", + "foreground": "#ecfdb9" + } + }, + { + "name": "Invalid", + "scope": "invalid", + "settings": { + "background": "#f92649", + "fontStyle": "", + "foreground": "#F8F8F0" + } + } + ], + + "uuid": "38b4e4f7-c037-42d5-8ccc-efa7c052d512", + "colorSpaceName": "sRGB" +}