Adds proper syntax highlighting for intel 8080 mnemonic assembly.
Note: by default, syntax highlighting is applied automatically to all
files with any of the following extensions: 8080
, 8080asm
, i8080
, i8080asm
.
VIM's assembly highlighting was designed with x86/x64 mnemonics in mind, and as such, it doesn't quite work for code written in Intel 8080 style mnemonics. Though it's more time-appropriate to use no syntax highlighting for Intel 8080 assembly, I will admit it is much nicer to work with highlighting, and I'm confident you'll agree.
You can view individual examples here: Plugin Highlighting, ASM Highlighting, and No Highlighting.
Installing the plugin as a Vim 8 Package
$ mkdir -pv ~/.vim/pack/sage-etcher/start
$ cd ~/.vim/pack/sage-etcher/start
$ git clone https://github.com/sage-etcher/vim-i8080-syntax.git
" true/enabled = 1
" false/disabled = 0
" Name: Directive Style
" Type: String
" Values: Value Description/Platform
" ------- ----------------------------------------------------------
" CPM CP/M's ASM Assembler
" NONE Don't use any non-standard definitions
let g:i8080_directive_style = 'CPM' "Default
" Name: Strict Number Highlighting
" Type: Boolean
" Enabled: No number may start with a '$'.
" All non-decimal numbers must start with a '0'.
" Disabled: Numbers can start with whatever.
" Example: Value Enabled Disabled
" -------- -------- ---------
" 07DH Good Good
" 0561Q Good Good
" 9AH BAD Good
" $1101B BAD Good
let g:i8080_strict_number_formatting = 1 "Default
" Name: Highlight Number Seperators
" Type: Boolean
" Enabled: 0$0010$1111B
" ^ ^
" Highlight group is linked to the 'Special' group
" Disabled: Highlights '$' same as the rest of the digits.
let g:i8080_highlight_number_seperator = 0 "Default
" Name: Highlight Number Type Specifier
" Type: Boolean
" Enabled: 0$0010$1111B
" ^
" Highlight group is linked to the 'Special' group
" Disabled: Highlights the number format specifier same as the rest of the
" digits.
let g:i8080_highlight_number_seperator = 0 "Default
" Name: PRN Syntax Highlighting
" Type: Boolean
" Enabled: Use the `syntax/i8080prn.vim` file for all extenstions in the
" `i8080_prn_extensions` variable (mentioned later).
" Disabled: Don't use the `i8080_prn_extensions` variable or the
" `syntax/i8080prn.vim` file.
let g:i8080_prn_highlighting = 1 "Default
" Name: ASM File Extensions
" Type: [String]
" Values: What file extensions should the `syntax/i8080.vim` syntax file be
" applied to?
" FileType: i8080
let g:i8080_asm_extensions = [
\ '*.i8080',
\ '*.i8080asm',
\ '*.8080',
\ '*.8080asm'
\ ] "Defaults
" Name: PRN File Extensions
" Type: [String]
" Values: What file extensions should the `syntax/i8080prn.vim` syntax file
" be applied to?
" FileType: i8080prn
let g:i8080_prn_extensions = [
\ '*.prn',
\ '*.PRN'
\ ] "Defaults
This file is a part of the Intel 8080 Syntax Highlighting Vim Plugin.
Copyright 2024 Sage I. Hendricks
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.