Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>P4 AssemblyNew to Visual Studio Code? Get it now.
P4 Assembly

P4 Assembly

Diogo Correia

|
1,748 installs
| (1) | Free
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.
Copied to clipboard
More Info

About

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.

Instructions

  1. Download P4 (v1.0.8) from the simulator website
  2. Open a .as file, right click on the editor and select the "Assemble & Run Simulator" option (or press CTRL+SHIFT+R)
  3. 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)

Credits

  • This is a fork from the P3 VSCode Extension by Guilherme Penedo.
  • The logo design was created by António Luciano.
  • The #constants and labels definitions for the syntax were taken from this extension.
  • Borrowed heavily from this extension.
  • Special thanks to José Neves for copy pasting all of instructions' documentation and adding in the assembler and simulator features
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft