| Using
the TextPad 4.5 Editor |
The following instructions assume you are using TextPad Version 4.5. You
can download an evaluation copy from www.textpad.com
Step 1: Build 16-bit MASM
- Select Preferences from the Configure menu.
- Select Tools in the left hand pane, and click the Add button.
- Select "DOS command..." from the drop-down list. When the popup
dialog appears, enter the following:
C:\Masm613\make16.bat $BaseName
- Click the Apply button.
- Next, you will rename the command to Build 16-bit MASM. To do this,
click once on the name, wait a second, and click again. When it turns blue,
retype the command's name and press Enter.
- Click OK to close the Preferences window.
- Select the Tools menu, and find Build 16-bit MASM command
listed there. In the right-hand pane, enter the following into the Initial
folder entry:
$FileDir
Following is a sample screen snapshot. (Optionally, you can check the Capture
output option to redirect the assembler's output messages to a TextPad editor
window.)

The Regular expression to match output entry is explained fairly well
in the TextPad help system. It makes it possible to click on an Assembler error
message and have TextPad jump to the appropriate line in your source program.
- Click OK to save your changes.
Testing:
- Make sure the file make16.bat is located in the MASM install directory (the
default is C:\Masm613).
- Open an ASM source file in the editor, and select Build 16-bit MASM
from the Tools menu. Your program should assemble and link.
Step 2: Run ASM Prog
- Select Preferences from the Configure menu
- Select Tools in the left hand pane, and click the Add button
on the right side
- Select DOS command... from the drop-down list. When the popup dialog
appears, enter the following:
$BaseName
- Click the Apply button.
- Next, you will rename the command to Run ASM Prog. To do this,
click once on the name, wait a second, and click again. When it turns blue,
retype the command's name and press Enter. Click Apply.
- Click on the "+" next to Tools in the left-hand pane. When
the list expands, select Run ASM Prog. In the right hand pane of the
dialog, remove the check mark next to Capture output.

- Click OK to close the dialog and save your changes.
Testing:
With your ASM program in the current TextPad window, select Run 16-bit MASM
from the Tools menu. You should see your program's output.
| The two commands you created will always act on the program in the currently
selected window. Normally, you execute the BUILD 16-bit MASM command,
and then if no errors result, you execute the Run 16-bit MASM command. |
Step 3: Debug 16-bit MASM
- Select Preferences from the Configure menu.
- Select Tools in the left hand pane, and click the Add button
on the right side.
- Select DOS command... from the drop-down list. When the popup dialog
appears, enter the following:
C:\Masm613\runCV.bat $BaseName
(Modify the path if you have installed MASM in a different directory)
- Select the Close DOS window on exit option
- Click the Apply button.
- Next, you will rename the command to Debug 16-bit MASM. To do this,
click once on the name, wait a second, and click again. When it turns blue,
retype the command's name and press Enter. Click Apply.
You're done!
If you need more information, TextPad has extensive online help that shows
how to edit the Tools menu. If you're making these modifications for multiple
users (as in a laboratory), you can use RegEdit to save the registry subtree
to a REG file. Look for the following entry:
HKEY_CURRENT_USER > SOFTWARE > Helios > TextPad 4 > Tools