More readme

master
Max Bane 2015-01-07 21:41:07 -05:00
parent 7726acca2b
commit 52c6446c56
1 changed files with 38 additions and 10 deletions

View File

@ -3,24 +3,39 @@ Vim syntax highlighting for the `ca65` assembler.
## Purpose ## Purpose
This codebase provides `asm_ca65.vim`, a Vim syntax-highlighting module for the This repository provides `asm_ca65.vim`, a [Vim](http://www.vim.org/)
`ca65` assembler. syntax-highlighting module for the
[`ca65`](http://cc65.github.io/doc/ca65.html) assembler.
`ca65` is a full-featured assembler for the 6502 family of microprocessors, `ca65` is a full-featured assembler for the [MOS
which powered such historic platforms as the KIM I, Apple II, Commodore 64, and 6502](https://en.wikipedia.org/wiki/MOS_Technology_6502) family of
Nintendo Entertainment System. It is a part of the popular `cc65` suite of microprocessors, which powered such historic platforms as the KIM I, Apple II,
development tools for the 6502, which also includes a C compiler, linker, object Commodore 64, and Nintendo Entertainment System. It is a part of the popular
dumper, etc. `ca65` is designed both for direct use by assembly programmers and [`cc65`](https://github.com/cc65/cc65) suite of development tools for the 6502,
as the compilation target of the `cc65` C compiler. `ca65` is especially used by which also includes a C compiler, linker, object dumper, etc. `ca65` is
"homebrew" communities for the NES, SNES, etc. designed both for direct use by assembly programmers and as the compilation
target of the `cc65` C compiler. `ca65` is especially used by "homebrew"
communities for the [NES](http://nesdev.com), SNES, etc.
The stock Vim runtime distribution includes syntax modules for several dialects The stock Vim runtime distribution includes syntax modules for several dialects
of assembly, as well as a "generic" module (which is really for the GNU of assembly, as well as a "generic" module (which is really for the GNU
Assembler), none of which works particularly well with 6502 assembly Assembler), none of which works particularly well with 6502 assembly
conventions, and especially not with `ca65`'s many added features in particular. conventions, and especially not with `ca65`'s many added features.
## Features ## Features
* Highlights 6502 instruction mnemonics as keywords, with special highlighting
for "illegal" instructions, and error highlighting for unknown (typo)
instructions.
* Highlights all valid `ca65` numeric and string literals, label
definitions, and comments, with special highlighting for TODOs, FIXMEs, etc.
* Highlights all valid expression operators and control comands, with special
treatment for various classes of commands, including `.fileopt`, segment
names, includes, macro definitions, storage types, conditional assembly,
linker control commands, structs, unions, procedures, pseudo-functions, some
built-in macros, console output commands (`.out`, `.warn`, .etc.), and
assembler behavior switches.
### Examples (screenshots) ### Examples (screenshots)
#### Solarized colorscheme #### Solarized colorscheme
@ -35,7 +50,20 @@ conventions, and especially not with `ca65`'s many added features in particular.
## Limitations ## Limitations
* `asm_ca65.vim` currently has no awareness of, or support for, assembler
options that change the rules of valid labels, identifiers, and literals from
their defaults, for example the following `.feature` options and related
command-line switches to `ca65`.
* `.feature at_in_identifiers`
* `.feature dollar_in_identifiers`
* `.feature labels_without_colons`
* `.feature underline_in_numbers`
## Installation ## Installation
Simply place `asm_ca65.vim` in your `~/.vim/syntax/` directory, or, if you use
Pathogen, clone this repository under `~/.vim/bundle/`.
## Usage ## Usage
`:set syntax=asm_ca65` or create an `autocmd`, as with any syntax module.