DOS assembly (MASM/TASM) via DOSBox(and msdos-player)
中文 in gitee|
Language support for DOS assembly,may be suitable for studying MASM/TASM in DOSBox and the course principles& peripheral technology of microprocessor.
- (Language Support) Offer grammar,basic outline view,hover,code formate support for DOS assembly language
- Run and debug assembly with right click on the VSCode editor panel. You can choose using MASM or TASM in the preference-settings.
- Diagnose: process the output of ASM tools and display them in VSCode
- For windows, all needed tools have been packaged in the extension.Just install and enjoy!
- For other systems: you need to install DOSBox first
- Note: this extension is built for assembly in DOS, so may not works well with assembly for win32 or assembly with not just one file
Demo 1: Run and Debug Assembly
|using TASM via DOSBox
||using MASM via msdos-player
when you are editing
assembly files ,you can right click at the editor panel,then you will see several choices listed below:
- Open Emulator: Open the dosbox, prepare the environment(copy file to dosbox's D:\ and add tools to path)(For msdos player mode,this will open a cmd terminal)
- Run ASM code: Assemble,link and Run the program
- Debug ASM code: Assemble,link and Debug the program
- The extension will copy your file in active editor to the extension's
workspace folder and do operations. - Default is using
TASM,you can change them in
preference->settings like the second gif(using MASM via msdos-palyer).
- If you use
include to include another file or use
extern, please use
dosbox here(see demo2)
Demo 2: Open dosbox and type the command you need
- Command "
Open Emulator": Your file will be copied as
D:\T.ASM in DOSBox. (The extension will copy your file to work space and mount this space to DOSbox disk
- Command "
Doxbox here": The extension will mount your active editor file's folder directly to dosbox's disk
- some ASM commands you may need: ASM_commands.
- Some interesting assembly codes you may need: DOSBox ASM codes
Demo 3: code Formate,Diagnose and more
The extension offer some programmatic features like "hover","formate","jump to definition",you can close them in the
For other system
The extension is packaged with needed tools for windows inside while other OS users should make sure DOSBox can be opened by shell command.We can download DOSBox from its website:DOSBox
For MacOS (Darwin),the extension will use command
open -a DOSBox --args to open DOSBox. So you need to
- download dmg file from DOSBox's website
- Double-click the
.DMG file to mount it. A new Finder window showing its contents should appear.
- double-click the mounted volume on your desktop and drag the app icon from there to the “Applications” icon in the Finder sidebar.
For Ubuntu and other linux system user,The extension will use shell command
dosbox to open DOSBox. We can use command like this:
sudo apt install dosbox #install dosbox
dosbox #if successfully opened the dosbox, it is largely possible for the extension to use dosbox
You can also use the setting ID
masmtasm.dosbox.command to set your command for the extension to open DOSBox.
for more,please see the
masmtasm.ASM.MASMorTASM use MASM or TASM assembler in DOS emulator to run and debug assembly
masmtasm.ASM.emulator use dosbox or msdos-player as DOS emulator
DOSBox (default) more stable
msdos-playerquiet, it runs in command prompt(CMD). So it cannot support GUI like
auto auto select
- use msdos-player to compile and link
- use DOSBox to run
- use msdos-player for MASM(debug)
- use DOSBox for TASM(TD)
masmtasm.ASM.savefirst save file first before using
masmtasm.dosbox.run：what to do after run your code in DOSBox
masmtasm.ASM.toolspath: use tools from this path, see Toolpath
masmtasm.dosbox.config: set the dosbox configuration. The setting will be write to a
.conf file which will be used by the DOSBox launched by the extension. Set the config like below:
"SDL.windowresolution": "1024x640",//set the size of the dosbox window
About use of DOSBox
The extension will mount some folder to DOSBox 's disk. Please don't modify them.
||real path in the computor
||the path of tools folder
||the path of the work space
||the path of the editor file's folder(when using command
- lack of support of assembly in not just one file
Docs & Thanks & Licenses