Basic language support for assembly in DOS environment. It may be suitable for studying MASM/TASM in DOSBox or courses like Principles and Peripheral Technology of Microprocessor.
- Language Support: Offers grammar validation, basic outline view, hover tips, and code formatting support for DOS assembly language
- Run and Debug: Right-click on the VS Code editor panel to run and debug your code
- Diagnose: Processes the output of ASM tools and displays diagnostics in VS Code
- Supports all platforms including Web — see Platform Support
- Note: This extension is built for learning assembly in DOS, and it does not work with Win32 assembly
| Format Code | Diagnose |
|---|---|
![]() |
![]() |
The extension provides language features such as hover hints, code formatting, and jump to definition for the assembly language ID.
You can also use other assembly language support extensions (e.g., the asm-collection language ID) by installing ASM Code Lens.
| Using TASM via DOSBox | Using MASM via msdos-player |
|---|---|
![]() |
![]() |
When editing assembly files, right-click in the editor panel to access the following options:
- Open Emulator: Launch DOSBox and prepare the runtime environment
- Run ASM Code: Assemble, link, and execute the program
- Debug ASM Code: Assemble, link, and debug the program
- For single-file projects, set the configuration
masmtasm.ASM.modetosingle file. The extension will copy your file to an isolated directory to keep your workspace clean. - For multi-file projects, set
masmtasm.ASM.modetoworkspaceand ensure filenames comply with the emulator's limitations.- For example, when using
include <filename>,<filename>should be a relative path from your workspace root directory
- For example, when using
- Note that this extension is not optimized for complex projects
This extension interfaces with the DOSBox(-X) binary via Node.js's child_process module.
You must install DOSBox or DOSBox-X first to use this feature.
Since VS Code is primarily built with JavaScript (TypeScript), we support the WebAssembly (Wasm) version of DOSBox(-X) — namely js-dos. The extension bundles all required js-dos files, and it uses js-dos as the default DOS emulator for Web platform support.
You can customize the build commands by modifying the masmtasm.ASM.actions configuration.
For example, to compile your code to a .com file, add the following configuration and set masmtasm.ASM.assembler to its key (TASM-com):
"masmtasm.ASM.actions": {
"TASM-com": {
"baseBundle": "<built-in>/TASM.jsdos",
"before": [
"PATH %PATH%;C:\\TASM"
],
"run": [
"TASM ${file}",
"TLINK /t ${filename}",
"${filename}"
],
"debug": [
"TASM /zi ${file}",
"TLINK /t/v/3 ${filename}.obj",
"TD ${filename}.exe"
]
}
},
"masmtasm.ASM.assembler": "TASM-com"- Special thanks to my teacher, Mr. Han. Wishing 2020 and the coming 2021 to be happy and fulfilling years.
- Inspired by Woodykaixa's masm-code project
- Thanks to the excellent DOS emulators: DOSBox, caiiiycuk's js-dos, and msdos-player
- Thanks to Roncho's extension Assembly (TASM) and blindtiger's masm for reference on assembly language support
- We welcome issues and pull requests to help improve this extension
- Acknowledgments
- Additional Information: Wiki
Enjoy! 😊



