vRISC-16 Support
vRISC-16 Support is a Visual Studio Code extension that adds basic IDE features for the vRISC-16 assembly language.
It provides syntax highlighting, snippets, completion and simple diagnostics for vRISC-16 asm files.
Main project: https://github.com/pzarczynski/vRISC-16
Features
- Syntax highlighting for:
- mnemonics, registers, labels, directives, macros (
HIGH, LOW)
- numeric literals, memory addressing (
[rX], etc.)
- Snippets:
- common directives (
.org, .word)
- label skeletons
- helper patterns using
HIGH/LOW
- Auto-completion:
- all vRISC-16 instructions (ADD, SUB, LD, ST, LHI, LLI, branches, shifts, JMP, JAL)
- directives (
.org, .word)
- registers (
r0–r15)
- relocation macros
HIGH and LOW
Installation
From VSIX
- Download the
vrisc-16-support-<version>.vsix file.
- In VS Code:
- Open the Extensions view.
- Click on the
... menu → Install from VSIX... and select the file.
Or from the command line:
code --install-extension vrisc-16-support-<version>.vsix
Usage
- Create a file with one of the supported extensions:
.vrasm, .vasm, .vrs.
- Make sure the language mode in the status bar is set to vRISC-16 Assembly.
- Start typing; use
Ctrl+Space to trigger completion for mnemonics, registers, directives, and macros.
- Check the Problems panel for syntax issues.
Example:
.org 0x0100
main:
LHI r1, 0
LLI r1, 2
LHI r7, HIGH(x)
LLI r7, LOW(x)
LD r2, [r7]
LHI r7, HIGH(sum)
LLI r7, LOW(sum)
JAL r6, r7
sum:
ADD r1, r1, r2
JMP r6
.org 0x8000
x: .word 1
Development
This extension is part of the vRISC-16 project: https://github.com/pzarczynski/vRISC-16
- Open the extension folder in VS Code.
- Press
F5 to launch a new Extension Development Host.
- Open a
.vrasm file and test syntax highlighting, snippets, completion and diagnostics.
Release Notes
0.0.1
- Initial release.
- Syntax highlighting, snippets, completion for vRISC-16, basic syntax diagnostics.
| |