I found the solution, thanks to @Jester.
Just add 4 commas behind your file name.
Just add a semicolon behind your file name ~ @Ross Ridge
For example, you need to compile foo.asm
and link foo.obj
:
*File extension can skip.
masm foo;
Same for linking
link foo;
Usage:
So you can directly execute your asm file through Notepad++ using NppExec
"<insert your DOSBox directory>" -c "mount <insert drive that contain 8086 folder> <insert 8086 folder directory>" -c "<insert drive that contain 8086 folder>:" -c "masm $(NAME_PART);" -c "link $(NAME_PART);" -c "$(NAME_PART)"
For my script is:
"D:\Program Files (x86)\DOSBox-0.74\DOSBox.exe" -c "mount d d:\8086" -c "d:" -c "masm $(NAME_PART);" -c "link $(NAME_PART);" -c "$(NAME_PART)"
This script helps you execute your .asm file only with one key press instead of 30+ key presses (yes, I counted).
The following steps is for people don't know how to use Notepad++ or NppExec:
- Install Notepad++
- Install Plugin Manager
- Install NppExec using Plugin Manager
- Press F6
- Paste the script
- Press save and give a name
- Go to Plugins > NppExec > Advanced Option
- Select the script you save in Associated script > Add/Modify > Close
- Go to Macro > Modify Shortcut/Delete Shortcut > Select Plugin
commands tab > Set a shortcut for your script
*Remember to put your .asm
file in the same directory with your masm.exe
Done! Hope I minimize your misery.