VS Code language support for the P4 Assembly programming language, the language used in the fictitious processor P4, created at IST for educational purposes.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
VS Code addon providing language support for the P4 Assembly programming language, the language used in the fictitious P4 processor, created at IST (Instituto Superior Técnico) for educational purposes.
Known issues
The content in the simulator only changes when you save the original file.
You must use the simulator in split screen with the editor file, otherwise the code won't sync.
Open a .as file, right click on the editor and select the "Assemble & Run Simulator" option (or press CTRL+SHIFT+R)
Move the window to split screen (see known issues)
Features
The images below are from the P3 Assembly extension. The simulator integration looks different.
Syntax highlighting (different themes will render different colors): recognizes all of P4's instruction mnemonics, labels and addressing modes;
Hover documentation: put your mouse over an instruction or register to see its documentation and usage
Constant convertion: put your mouse over a constant to see its binary, hex, decimal and ascii values.
In editor assemble and run: assemble your code with a click or mouse shortcut and launch the simulator. The extension saves your assembler and simulator selections
Variable declaration features: jump to constants/variables definition (right click > definition or command/control+click)
Label declaration features: jump to a label's position on the source code (on CALL, BR and JMP instructions)