DOS assembly (MASM/TASM) via DOSBox(and msdos-player)
Language support for DOS assembly,may be suitable for studying MASM/TASM 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
Features
when you are editing assembly
files ,you can right click at the editor panel,then you will see several choices listed below:
- Open dosbox: Open the dosbox, prepare the environment(copy file to dosbox's D:\ and add tools to path)
- Run ASM code: Assemble,link and Run the program
- Debug ASM code: Assemble,link and Debug the program
Demo
Demo 1: Run and Debug Assembly
using TASM via DOSBox | using MASM via msdos-player |
---|---|
When opened a ASM file in Editor, Right click on the Editor, then run or debug the code. Default mode is using DOSBox
and TASM
, you can change them in preference->settings
like the second gif(using MASM via msdos-palyer).
Demo 2: code Formate,Diagnose and more
Formate Codes | Diagnose |
---|---|
The extension offer some programmatic features like "hover","formate","jump to definition",you can close them in the preferece->settings
Demo 3: Open dosbox and type the command you need
Single-File (command Open DOSBox ) |
Multi-Files (command Dosbox here ) |
---|---|
- Command "
Open DOSBox
": Your file will be copied asD:\T.ASM
in DOSBox. (The extension will copy your file to work space and mount this space to DOSbox diskD:
) - Command "
Doxbox here
": The extension will mount your active editor file's folder directly to dosbox's diskE:
. - some ASM commands you may need: ASM_commands.
- Some interesting assembly codes you may need: DOSBox ASM codes
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.
Extension Settings
for more,please see the preference->settings
masmtasm.ASM.MASMorTASM
use MASM or TASM assembler in DOS emulator to run and debug assemblymasmtasm.ASM.emulator
use dosbox or msdos-player as DOS emulatorDOSBox
(default) more stablemsdos-player
quiet, it runs in command prompt(CMD). So it cannot support GUI likeTD.exe
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 usingmasmtasm.dosbox.run
:what to do after run your code in DOSBoxmasmtasm.dosbox.CustomResolution
: size(resolution) of the dosbox window,for example1024x960
masmtasm.ASM.toolspath
custom path of your ASM tools. #about-tools
About Tools
the extension has built in tools for windows. But if you need to use assembler or emulator of different version. You can organize your tools following the structure bellow and add your folder's path to masmtasm.ASM.toolspath
, see about ASM tools
- tools:your tools folder name, you can add the path of it to settings
masmtasm.ASM.toolspath
TASM
: TASM tools includingtasm.exe
,tlink.exe
,td.exe
MASM
: MASM tools includingmasm.exe
,link.exe
,debug.exe
dosbox
: dosbox.exe and related filesplayer
: msdos.exe
Folder dosbox and player are emulator for windows and this extension will not use them in other systems
About use of DOSBox
The extension will mount some folder to DOSBox 's disk. Please don't modify them.
in DOSBox | real path in the computor |
---|---|
C: | the path of tools folder |
D: | the path of the work space |
E: | the path of the editor file's folder(when using command dosbox here ) |
Docs & Thanks & Licenses
- Thanks to Roncho 's extension Assembly (TASM),blindtiger's masm for ASM language information
- Thanks to Woodykaixa's masm-code
- Using msdos player,dosbox as DOS environment emulator
- Welcome issue and PR to build a better extension with your help
- some infomation :wiki
Enjoy!:smile: