1
0

tooling: add vim syntax for ain-48 assembly

This commit is contained in:
2026-05-31 20:46:55 +02:00
parent c4dbfc0480
commit dd699cc933
3 changed files with 46 additions and 0 deletions

1
.gitignore vendored
View File

@ -2,4 +2,5 @@
/build /build
/docs/*.pdf /docs/*.pdf
/ain48 /ain48
/scratch

View File

@ -0,0 +1,6 @@
" ftdetect file for AIN-48 assembly
au BufRead,BufNewFile *.ain48s set filetype=ain48asm
au BufRead,BufNewFile *.ain48asm set filetype=ain48asm
au BufRead,BufNewFile *.a48s set filetype=ain48asm
au BufRead,BufNewFile *.a48asm set filetype=ain48asm

View File

@ -0,0 +1,39 @@
" Vim syntax file
" Language: AIN-48 Assembly
" Maintainer: Annwan
" Latest Revision: 31 May 2026
if exists("b:current_syntax")
finish
endif
syn case ignore
syn keyword ain48Mnemonic add aeq aut cess cst dem dst dvd ei et i ilg imlg iplg irrv ivc lg mpl nam ncivc ncrv nec nei ni nni npi nui padd pdem pdvd pi pilg pimlg piplg pmpl prsd pstr rsd rv sc sim str tsc ui vel
" Senary constants
syn match ain48Immediate "#[Ss][0-5]\+"
syn match ain48Immediate "#-[Ss][0-5]\+"
" Octal constants
syn match ain48Immediate "#[Oo][0-7]\+"
syn match ain48Immediate "#-[Oo][0-7]\+"
" Decimal constants
syn match ain48Immediate "#[Xx][0-9]\+"
syn match ain48Immediate "#-[Xx][0-9]\+"
" Binary constants
syn match ain48Immediate "#[Bb][01]\+"
syn match ain48Immediate "#-[Bb][01]\+"
syn match ain48Register "%[0-7a-z]\+"
syn match ain48Directive "\.[a-z0-9_-]\+"
syn match ain48Comment ";.*$" contains=ain48Todo
syn keyword ain48Todo contained TODO FIXME NOTE
syn match ain48Label "^[a-zA-Z0-9_-]\+:"
hi link ain48Mnemonic Statement
hi link ain48Comment Comment
hi link ain48Immediate Constant
hi link ain48Directive PreProc
hi link ain48Label Label
hi link ain48Register Identifier