├── settings └── language-agc.cson ├── .editorconfig ├── .gitignore ├── package.json ├── README.md ├── LICENSE.md └── grammars └── agc.cson /settings/language-agc.cson: -------------------------------------------------------------------------------- 1 | ".source.agc": 2 | editor: 3 | commentStart: "# " 4 | tabLength: 8 5 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | insert_final_newline = true 7 | trim_trailing_whitespace = false 8 | indent_style = tab 9 | indent_size = 4 10 | 11 | [*.agc] 12 | indent_size = 8 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Mac OS/X 2 | .apdisk 3 | .AppleDB 4 | .AppleDesktop 5 | .AppleDouble 6 | .DS_Store 7 | .LSOverride 8 | ._* 9 | 10 | 11 | ## IDE-specific 12 | sftp-config.json 13 | .project 14 | 15 | 16 | ## Windows 17 | Desktop.ini 18 | Thumbs.db 19 | ehthumbs.db 20 | $RECYCLE.BIN/ 21 | *.lnk 22 | 23 | 24 | ## Other 25 | error_log 26 | node_modules 27 | components 28 | npm-debug.log 29 | .apl.history 30 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "language-agc", 3 | "version": "1.0.0", 4 | "description": "Syntax highlighting for Apollo Guidance Computer (AGC) assembly code", 5 | "keywords": ["Apollo-11", "NASA", "Space", "Assembly", "ASM", "Assembler", "Moon Landing", "Astronauts"], 6 | "repository": "https://github.com/Alhadis/language-agc", 7 | "license": "ISC", 8 | "engines": { 9 | "atom": "*" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | AGC Assembly Highlighting 4 | ========================= 5 | 6 | This package provides syntax highlighting for Apollo Guidance Computer assembly, the language used to program the [Apollo‑11](https://en.wikipedia.org/wiki/Apollo_11) on its world-famous voyage to the moon. 7 | 8 | The [AGC source code](https://github.com/chrislgarry/Apollo-11) is freely available online. 9 | Information on the AGC assembly language itself may be [found here](http://www.ibiblio.org/apollo/assembly_language_manual.html). 10 | 11 | 12 | ### License 13 | [ISC](./LICENSE.md) 14 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016, John Gardner 2 | 3 | Permission to use, copy, modify, and/or distribute this software for any 4 | purpose with or without fee is hereby granted, provided that the above 5 | copyright notice and this permission notice appear in all copies. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 8 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 9 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 10 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 11 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 12 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 13 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 14 | -------------------------------------------------------------------------------- /grammars/agc.cson: -------------------------------------------------------------------------------- 1 | name: "Apollo Guidance Computer" 2 | scopeName: "source.agc" 3 | fileTypes: ["agc"] 4 | patterns: [include: "#main"] 5 | 6 | repository: 7 | 8 | # Top-level patterns 9 | main: 10 | patterns: [ 11 | {include: "#comment"} 12 | {include: "#number"} 13 | {include: "#inclusion"} 14 | {include: "#identifier"} 15 | {include: "#opcode"} 16 | ] 17 | 18 | # Comments 19 | comment: 20 | patterns: [{ 21 | 22 | # Comment-lines 23 | name: "comment.line.number-sign.agc" 24 | begin: "#" 25 | end: "$" 26 | beginCaptures: 27 | 0: name: "punctuation.definition.comment.agc" 28 | patterns: [ 29 | match: "TODO|FIXME|CHANGED|XXX|IDEA|HACK|NOTE|REVIEW|NB|BUG" 30 | name: "disable-todo" 31 | ] 32 | },{ 33 | # Annotations 34 | name: "comment.annotation.numeric.agc" 35 | match: "^\\t[-+]\\d+(?=\\t)" 36 | }] 37 | 38 | 39 | # Numeric literal 40 | number: 41 | name: "constant.numeric.agc" 42 | match: "[-+]\\d+(?:\\.\\d+)?D?" 43 | 44 | 45 | # Include directive 46 | inclusion: 47 | name: "meta.preprocessor.include.directive.agc" 48 | begin: "^\\$" 49 | end: "(?=\\s)" 50 | beginCaptures: 51 | 0: name: "punctuation.definition.directive.agc" 52 | 53 | 54 | # Programmar-defined name, such as a label or constant 55 | identifier: 56 | name: "entity.name.identifier.agc" 57 | match: "^(?!\\$)(?:[^#\\s]{1,7}\\t|[^#\\s]{8})" 58 | 59 | 60 | # Opcode 61 | opcode: 62 | name: "meta.opcode.agc" 63 | begin: "(?<=\\t)([^#\\s]+)(?=\\s|$)" 64 | end: "$|(?=#)|[^#\\s]+" 65 | beginCaptures: 1: name: "keyword.function.opcode.agc" 66 | endCaptures: 0: name: "variable.parameter.operand.agc" 67 | --------------------------------------------------------------------------------