The Z80 Macro-Assembler extension for Visual Studio Code provides the following features inside VS Code:
These few options allows you to configure extension's behavior but primarily your code-formatting preferences and code completion:
z80-macroasm.files.exclude
- Choose files or directories to exclude (e.g '**/*.{lst}'
).z80-macroasm.files.include
- Files to include and work with. If you, or your macro-assembler using a different conventions of source file extensions then change it here.
default:
"**/*.{a80,asm,inc,s}"
z80-macroasm.seekSymbolsThroughWorkspace
- If true, extension will crawl through all your workspace files to document all symbols. Otherwise, only includes are taken into account.
default:
false
z80-macroasm.format.enabled
- Turn on the experimental feature of format on-type or on-save.
default:
false
z80-macroasm.format.baseIndent
- How many tabstops you prefer before the instructions or keywords.
default:
2
z80-macroasm.format.controlIndent
- How many tabstops you prefer before the control structure keywords, selections, modules, or blocks.
default:
1
z80-macroasm.format.whitespaceAfterInstruction
- Which type of whitespace you want to put after the instruction - "tab"
, "single-space"
or "auto"
which autodetect file's tabstop type and width.
default:
"auto"
z80-macroasm.format.spaceAfterArgument
- If you want to put a single space character after comma (instruction's argument).
default:
false
z80-macroasm.format.spaceAfterInstruction
- If you want to put a single space character after instruction (before colon separator).
default:
true
z80-macroasm.format.spacesAroundOperators
- If you want to wrap an operators with spaces.
default:
false
z80-macroasm.format.uppercaseKeywords
- If true, uppercase all keywords, instructions and registers. False means all lowercased and "auto"
tries to auto-detect your code-style while typing.
default:
"auto"
z80-macroasm.format.bracketType
- Define which type of brackets around the instruction's arguments (pointers) you prefer: (round)
or [square]
.
default:
"no-change"
z80-macroasm.format.colonAfterLabels
- Put colon after each label or symbol (true or false, "no-change"
keeps it untouched).z80-macroasm.format.hexaNumberStyle
- Define which hexadecimal number format you prefer to reformat:
- "no-change" - no reformat happen (default)
- "hash":
#1fff
|#B45D
- "motorola":
$1fff
|$B45D
- "intel":
1fffh
|0B45Dh
- "intel-uppercase":
1fffH
|0B45DH
- "c-style":
0x1fff
|0xB45D
z80-macroasm.format.hexaNumberCase
- When reformatting of hexadecimal numbers was enabled, whether it's to be additional case processing applied when true
means uppercased, false
lowercased.
default:
"no-change"
z80-macroasm.format.suggestOnInstructions
- Extension will suggest also basic instruction mnemonics for the auto-completion, not only instruction arguments.
default:
false
z80-macroasm.format.splitInstructionsByColon
- Split colon separated instructions to lines.
default:
true
These keys/values can be used in your workspace or global settings.json
.
See example »»
There are some predefined problem matchers to handle reported errors from compilation output:
errmatcher-as
for Macroassembler ASerrmatcher-sjasmplus
for SjASMPluserrmatcher-sjasm
for SjASMerrmatcher-pasmo
for Pasmoerrmatcher-rasm
for rasmerrmatcher-tniasm
and errmatcher-tniasm-preprocessor
for tniASMThese values can be used in .vscode/tasks.json
of your project's build task.
See example »»
Ctrl+Shift+O
, Cmd+Shift+O
]Ctrl+T
, Cmd+T
]Generated map of every symbol defined considers also modules or temporal labels:
Show symbol's value or specific definiton on hover:
Martin Bórik is leading the development of this extension with some inspirations from these VS Code extensions:
z80asm-vscode
by Imanol Barriusovscode-pasmo
by BouKiCHirgbds-vscode
by Donald HaysThe Z80 Assembly extension is subject to these license terms.
The source code to this extension is available on github and licensed under the MIT license.