HJLebbink / asm-dude

Visual Studio extension for assembly syntax highlighting and code completion in assembly files and the disassembly window
MIT License
4.13k stars 98 forks source link
assembler assembly assembly-language-programming avx2 avx512 code-completion disassembly masm nasm syntax-highlighting visual-studio visual-studio-extension x86-64

AsmDude2

AsmDude2 represents a natural evolution from its predecessor, AsmDude. While AsmDude served as a single, all-encompassing plugin for VS2015/17/19, providing support for Assembly source code, AsmDude2 is built around a Language Server Protocol (LSP) and a lightweight Visual Studio extension (for VS2022), drawing its functionality from this LSP. Transitioning from a Visual Studio 2019 extension to one compatible with Visual Studio 2022 wasn't straightforward. Many of the features from the older AsmDude have yet to be ported, and some may never be. See the list of known issues and things still todo.

This extension can be found in the visual studio extensions gallery or download latest installer AsmDude.vsix (v2.0.0.4).

Features

Syntax highlighting and Code Folding

AsmDude2 offers support for the following architectures: the instruction sets of x86 and x64, as well as SSE, AVX, AVX2, Xeon-Phi (Knights Corner), and AVX-512 instructions. Most of the commonly used Masm directives covered, along with a selection of Nasm directives.

label-analysis

Code Descriptions

When you hover over a mnemonic, you may receive a pop-up with descriptions. These descriptions can be modified and added by updating the AsmDudeData.xml file, which will be located alongside the installed plugin binaries (.vsix). Finding the directory where plugins are installed can be a bit challenging; you might want to try a location like C:\Users\AppData\Local\Microsoft\VisualStudio\17.0\Extensions\AsmDude2\2.0.0.1\Server. I kindly encourage you to share any updates you make.

code-descriptions

Please note that the formatting of the pop-up does not display Markdown (see the known issues)

Code Completion

While typing text, the completion lists will be refined to display the relevant language keywords. This applies to all keywords. However, please be aware that code suggestions may not be flawless at this stage; only valid code completions should be proposed.

code-completion

Signature Help

Signature Help, also referred to as Parameter Info, presents the method's signature in a tooltip when a user enters the character marking the start of the parameter list (e.g., in C++, an opening parenthesis). As the user types a parameter and a parameter separator (usually a comma), the tooltip is refreshed to display the next parameter in bold.

label-analysis

Disassembly Window in VS

Syntax highlighting in the disassembly window. No QuickInfo tooltips yet (see known issues)

Where is the Source (Are you sure this is not a honeypot?!)

If you're reading this, you're probably an assembly programmer. However, if you're still interested in some C#, or you're just being cautious, you can run the extension from the source code. To do that, you'll need to have the Visual Studio 2022 SDK installed. To run the extension, press F5 or select the 'Debug > Start Debugging' option from the menu. This will launch a new instance of Visual Studio under the experimental environment.

Things For a next release

Feature Requests: (desire something - let me know)

Updates:

Known issues