Skip to content

vim-chip8 v1.0

Latest
Compare
Choose a tag to compare
@jackiekircher jackiekircher released this 01 Oct 02:12
· 1 commit to 3abdb8c63e0c256e8a01a922c882abc5ef70d863 since this release

vim-chip8

the version 1.0 release of Chip8 syntax and indentation rules comes with full support for the SuperChip and XO-Chip instruction sets, along with all of their keywords and constants.

Keywords

The following keywords are supported:

conditionals: begin, else, end, if, then, while
constants: buzzer, const, delay, key
functions: bcd, jump, jump0, load, save, sprite
repeats: again, loop
statements: :alias, :breakpoint, :next, :unpack, clear, return

There is also syntax highlighting for named subroutines, integer/hex/binary values, and comments.

Indentation

Auto-indentation will trigger for the following cases

  • indent one shiftwidth on lines following loop
  • indent one shiftwidth on lines following while
  • unindent to matching loop when ending it with again
  • indent one shiftwidth on lines following if ... begin and else
  • unindent to matching if ... begin when ending it with end
  • indent to zero for new labels
  • indent one shiftwidth on lines following new labels
  • indent to zero when ending a subroutine with ;

SuperChip

An expanded set of keywords are supported for the SuperChip instruction set. These are not enabled by default, but are easy to turn on (see the README for details).

constants: bighex
functions: hires, loadflags, lores, saveflags, scroll-down, scroll-left, scroll-right
statements: exit

XO-Chip

Another set of keywords are available to support the XO-Chip instructions. These are also no enabled by default but the README has directions on how to include them.

constants: long
functions: plane, scroll-up
statements: audio