These instructions operate under the following assumptions:
- Notepad++ is installed to C:\Program Files\Notepad++
- The NppExec plugin is installed through Notepad++'s Plugin Manager.
- FASM (flat assembler) is installed to C:\Program Files\FASM
- You've added the Environment Variable (system variable) "INCLUDE" within Windows which points to C:\Program Files\FASM\INCLUDE (restarting may be required).
In Notepad++, navigate to Plugins -> NppExec -> Execute... and paste the following:
Click "Save..." and under "Script name" type "Compile" and click "OK".
Again, navigate to Plugins -> NppExec -> Execute... and paste the following:
Click "Save..." and under "Script name" type "Run" and click "OK".
Navigate to Plugins -> NppExec -> Advanced Options... In the "Menu items" pane, check the box next to "Place to the Macros submenu". Under the "Associated script" drop-down menu select "Compile" and give it an appropriate "Item name" (e.g., Compile) and click "OK". Repeat this process again once more but select "Run" from the "Associated script" drop-down menu instead.
Navigate to Settings -> Shortcut Mapper... Click on the "Plugin commands" button and scroll down until you find both "Compile" and "Run". If you want the same shortcuts used in FASMW next to "Compile" click "Modify" and create the shortcut "CTRL + F9". Do the same for "Run" but instead use the shortcut "F9".
We're finished. Now when you're working on an *.asm document in Notepad++ and press F9, FASM will compile the source code and if no errors arise, will launch the newly-compiled binary.
NPP_SAVE
SET FASM = "C:\Program Files\FASM\FASM.EXE"
CD "$(CURRENT_DIRECTORY)"
cmd.exe /c "$(FASM) "$(FILE_NAME)" "$(NAME_PART).exe""
UNSET FASM
Click "Save..." and under "Script name" type "Compile" and click "OK".
Again, navigate to Plugins -> NppExec -> Execute... and paste the following:
NPP_SAVE
SET FASM = "C:\Program Files\FASM\FASM.EXE"
CD "$(CURRENT_DIRECTORY)"
cmd.exe /c "$(FASM) "$(FILE_NAME)" "$(NAME_PART).exe" && "$(NAME_PART).exe""
UNSET FASM
Click "Save..." and under "Script name" type "Run" and click "OK".
Navigate to Plugins -> NppExec -> Advanced Options... In the "Menu items" pane, check the box next to "Place to the Macros submenu". Under the "Associated script" drop-down menu select "Compile" and give it an appropriate "Item name" (e.g., Compile) and click "OK". Repeat this process again once more but select "Run" from the "Associated script" drop-down menu instead.
Navigate to Settings -> Shortcut Mapper... Click on the "Plugin commands" button and scroll down until you find both "Compile" and "Run". If you want the same shortcuts used in FASMW next to "Compile" click "Modify" and create the shortcut "CTRL + F9". Do the same for "Run" but instead use the shortcut "F9".
We're finished. Now when you're working on an *.asm document in Notepad++ and press F9, FASM will compile the source code and if no errors arise, will launch the newly-compiled binary.