This extension implements the provideHover and provideCompletionItems functions of IntelliSense into the editor for the WRAMP Assembly language. It also provides an "Assemble & Link" button in the editor titlebar menu.
New Features
- Assemble, Link & Run - Found in the Assemble & Link dropdown, uses a modified wsim that will automatically open the srec
- Stack Checking - Will warn you if your program doesn't move the stack pointer back to where it started (Potential overflow / underflow)
WRAMP was developed by the University of Waikato as an easy-to-learn architecture for teaching assembly language and basic processor concepts.
Intellisense input suggestions will appear which contain all WRAMP Instruction set commands, as well as directives. The suggestions have accompanying documentation and use snippet strings which create input fields when needed, which can be tabbed between.
Commands, Directives and system registers also have documentation which will display upon hover. Includes command parameters, type and function explanations.
When in a WRAMP assembly file, a compile code button will be visible in the file header menu. By default this will run wasm assemble the current file and then link the single file into an srec. To specify any additional files which should be assembled at the same time as the current file (.s to .o), add this comment to the top of your file:
#wasm additionalFile1 additionalFile2
(Dont include file extensions. Don't add the current file to this comment, it will be done by default)
To specify any additional files which should be linked to your assembled code (.o to .srec) add this comment at the top of your file. (Same syntax as wasm)
#wlink otherCodeFile LibraryFile
directive suggestions
inserted snippet string
directive hover instruction hover register hover
based on (vaguely) https://github.com/microsoft/vscode-extension-samples/tree/main/completions-sample
if developing follow install instructions from here https://github.com/microsoft/vscode-extension-samples/
Usage
- git clone https://github.com/JayBigGuy10/WRAMP-Assembly-Intellisense
- npm install in the terminal,
- then F5 to run the sample
thanks to stackoverflow.com/67749752/ and stackoverflow.com//54792391/ for providing needed usage contex
https://code.visualstudio.com/api/working-with-extensions/publishing-extension
https://code.visualstudio.com/api/language-extensions/programmatic-language-features#show-hovers
https://code.visualstudio.com/api/references/vscode-api#languages.registerCompletionItemProvider
find the published extension here: https://marketplace.visualstudio.com/items?itemName=JLitolff-WaikatoUni.wramp-assembly-intellisense