Nyx Assembly Language Syntax Highlighter
This VS Code extension provides syntax highlighting for the Nyx Assembly language, a custom assembly language designed for a GPU on FPGA.
Features
- Syntax highlighting for Nyx Assembly instructions
- Support for special instructions, registers, and flags
- Highlighting for labels, comments, and immediate values
Installation
From VSIX
- Download the
.vsix file from the releases
- Open VS Code
- Go to Extensions view (
Ctrl+Shift+X )
- Click on the "..." (More Actions) button in the Extensions view
- Select "Install from VSIX..."
- Select the downloaded
.vsix file
Manual Installation
- Copy this folder to your VS Code extensions folder:
- Windows:
%USERPROFILE%\.vscode\extensions
- macOS/Linux:
~/.vscode/extensions
- Restart VS Code
Supported File Extensions
.nyx files are automatically recognized
Language Features
The highlighter recognizes:
- Instructions:
add , sub , mul , or , not , bsh , jmp , etc.
- Flags:
.f , .s , .c , .n , .z and combinations
- Registers:
r0 -r15
- Immediate values:
#123 , #0xFF , #0b101
- Labels:
.label:
- Comments:
; comment
Example
; Example Nyx Assembly code
.loop:
add r0, r1, r2 ; Add r1 and r2, store in r0
mul.f r3, r0, r4 ; Multiply r0 and r4 with flag f
bsh r5, [#4](https://github.com/Y10-Labs/nyx-asm/issues/4), r6 ; Barrel shift r6 by 4 bits
ldb.f r7, r8, r9 ; Load with flag f
beq r0, .end ; Branch if equal to end
jmp r0, .loop ; Jump back to loop
.end:
hlt ; Halt
| |