Giter VIP home page Giter VIP logo

vim-asm_ca65's Introduction

vim-asm_ca65

Vim plugin for the ca65 assembly language.

Purpose

This repository provides a Vim syntax-highlighting plugin, auto-indent plugin, and filetype plugin for the ca65 assembly language.

ca65 is a full-featured assembler for the MOS 6502 family of microprocessors, which powered such historic platforms as the KIM I, Apple II, Commodore 64, and Nintendo Entertainment System. It is a part of the popular cc65 suite of development tools for the 6502, which also includes a C compiler, linker, object dumper, etc. ca65 is 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, SNES, etc.

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 Assembler), none of which works particularly well with 6502 assembly conventions, and especially not with ca65's many added features.

Features

  • Syntax highlighting
    • 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.
  • Auto-indent
    • Auto-indent under labels, .procs, .if statements, macro definitions, macro call parameters, scopes, unions, and structs. Automatically de-dent when closing these structures.
  • Filetype plugin
    • Defines ca65 comment syntax for Vim's automatic comment formatting features.
    • Recognizes .include, .incbin, and .macpack statements for Vim's include-aware features.

Examples (screenshots)

Solarized colorscheme

Elflord colorscheme

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 and Usage

Install in the normal way (i.e., place the contents of the syntax/, indent/ and ftplugin/ directories in corresonding locations in your vim runtime path), or, if you use Pathogen, clone this repository under ~/.vim/bundle/.

Everything is enabled by setting a buffer's filetype to asm_ca65. For example, if all of your ca65 assembly source files end with the .s and .inc suffixes, the follwing suffices in your .vimrc:

filetype plugin indent on
augroup filetypedetect
    au BufNewFile,BufRead *.s,*.inc set ft=asm_ca65
augroup END

vim-asm_ca65's People

Contributors

krischik avatar maxbane avatar ricardoquesada avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

vim-asm_ca65's Issues

JSL missing?

the 65816 mnemonic JSL appears to be missing, is this intentional or was this a mistake?

.repeat / .endrepeat

Thanks for creating the project!

Could you please add support for .repeat and .endrepeat ?
I can send you a PR if you want, just let me know if I should use asm_ca65PseudoFun or something else. thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.