IDE >> JCreator 3

 

This page shows you how to set up JCreator Version 3.x for assembling, linking, and debugging assembly language programs. We will do this by adding commands to its Tools menu.

Last update: 12/22/2005

JCreator (by Xinox software, Inc) is a popular editor among Java programmers, and is already installed in many university computer labs. You can download the LE version (limited edition) for free, or you can buy the Pro version for a reasonable (Academic) price. Visit jcreator.com for details. In the followng tutorial, we will assume you are using the LE version.

Step 1: Build 16-bit MASM

First, you will add a command named Build 16-bit MASM to the Tools menu in JCreator.

  • Select Options from the Configure menu.
  • Select Tools in the left-hand pane of the Options dialog.
  • Click the New button and select DOS Command.
  • Enter Build 16-bit MASM, click the OK button, and click the Apply button.
  • Select 16-bit MASM in the Tools menu, and enter the following information. If your directory path contains embedded spaces, you should surround the Initial directory entry with quotation marks, as in "$[CurDir".
    You may optionally select the Capture output option, if you are running Windows 2000 or Windows XP.
Note to Advanced Users: The Capture output option can still be used with Windows 98, but you must remove the PAUSE command located at the end of the make16.bat file. Otherwise, JCreator will not terminate the process that runs the batch file.

Click the OK button to close the Options dialog.

Step 1A: Test your new command

Open an ASM file from the Chapter 15 examples. The Colorstr.asm program would work well for this example. JCreator doesn't know about ASM files, of course, so you'll have to select "All files (*.*)" from the pull-down list in the Open dialog.

Select Build 16-bit MASM from the Tools menu. Your program should assemble and list all files in the current directory beginning with "Colorstr".

Step 2: Debug 16-bit MASM

Next, you will add a command named Debug 16-bit MASM to the Tools menu in JCreator.

  • Select Options from the Configure menu, select Tools in the left-hand pane of the Options dialog, click the New button and select DOS Command.
  • Enter Debug 16-bit MASM into the edit window and click the OK button. Click the Apply button.
  • Select Debug 16-bit MASM under Tools in the left-hand pane. Enter the following string under a in the right-hand pane:
     

If your directory path contains embedded spaces, you should surround the Initial directory entry with quotation marks, as in "$[CurDir".

Click on OK to close the Options dialog.

Step 2A: Test your new command

Assuming that you just ran Step1A to build the ColorStr program, we can now debug the same program. Select Debug 16-bit MASM from the Tools menu. The CodeView debugger should load. (For more information on using CodeView, see our CodeView tutorial on this Web site.)

While running CodeView, you can exit anytime by selecting Exit from CodeView's File menu.

Step 3: Build 32-bit MASM

You're going to add a command named Build 32-bit MASM to the Tools menu in JCreator.

This step is identical to the Build 16-bit MASM command you created earlier. The only difference is that you need to insert the make32.bat filename in the Arguments entry:

c:\Masm615\make32.bat  $[FileBase]

The following screen snapshot shows the setup for the Build 32-bit MASM command:

You may optionally select the Capture output option, if you are running Windows 2000 or Windows XP.

If your directory path contains embedded spaces, you should surround the Initial directory entry with quotation marks, as in "$[CurDir".

Note to Advanced Users: The Capture output option can still be used with Windows 98, but you must remove the PAUSE command located at the end of the make16.bat file. Otherwise, TextPad will not terminate the process that runs the batch file.

Click on OK to close the Options dialog.

Step 3A: Test the "Build 32-bit MASM" command

Open one of the 32-bit programs from the book examples. For example, you can select ArryScan.asm from Chapter 6. Build the program and verify that your new command works.

Step 4: Debug 32-bit MASM

You're going to add a command named Debug 32-bit MASM to the Tools menu in JCreator.

Select Options from the Configure menu. Select Tools in the left-hand pane of the Options dialog. Click the New button and select Program. Using the browse button provided you, navigate to the EXE file for the debugger you plan to use. Depending on which which 32-bit debugger you plan to use, here are some common filenames to look for:

  • Microsoft Visual Studio.Net debugger: devenv.exe
  • Microsoft Visual C++ 6.0 debugger: msdev.exe
  • Microsoft Windows Debugger: windbg.exe

The following, for example, is the complete path on a sample computer to the Visual Studio.Net debugger:

C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.exe

Once you have found a suitable debugger, click the Open button, then the Apply button. Then rename the tool to Debug 32-bit MASM.

Select the tool in the left-hand pane. In the right-hand panel, notice that the Command entry contains the full path to the devenv.exe program. Fill in the remaining values as shown:

 

If your directory path contains embedded spaces, you should surround the Initial directory entry with quotation marks, as in "$[CurDir".

Click on OK to save your changes.

Step 4a: Test the "Debug 32-bit MASM" command

Assuming that you successfully assembled and linked a 32-bit program during Step 3a, you can now open its EXE file using the debugger. Select Debug 32-bit MASM from the Tools menu. Your 32-bit debugger should load the program.

Debugger commands vary widely, of course, so we have a separate area on this Web site that deals with debugger commands. You can find it from the book's home page.

Step 5: Run MASM

You're going to add a command named Run MASM to the Tools menu in JCreator.

Select Options from the Configure menu. Select Tools in the left-hand pane of the Options dialog. Click on New and select DOS Command. Enter Run MASM into the edit window and click on OK. Click on Apply.

Select Run MASM under Tools in the left-hand pane. Enter the following arguments:

Be sure to include the quotation marks around the initial directory

 

Do not check the Close Console on exit option

Click on OK to close the Options dialog.

Test this new command by building a 16-bit or 32-bit assembly language program, and then selecting Run MASM from the Tools menu.

Syntax Highlighting

A cool feature of JCreator is the way it lets you use color highlighting for keywords, comments, and operators. It reads XML syntax files tailored for individual programming languages. Owen Cosby, a student at Antelope Valley College, has generously permitted us to distribute a syntax file he created for MASM 6. Right-click here to download the file. Save it in JCreator's \Syntax directory. For the LE version, the location will probably be this: C:\Program Files\Xinox Software\JCreatorV3LE\Syntax. Or for the Pro version, it will probably be: C:\Program Files\Xinox Software\JCreator Pro\Syntax.

JCreator PRO users only: Define an ASM Document Type

We mentioned earlier that ASM files are not one of the standard(optional) file types recognized by JCreator. If you're using JCreator Pro, you can change that by adding ASM to the Options / Documents list.

With JCreator running, close any edit windows that might currently be open. Select one of the two blue boxes coming up next, depending on which version of JCreator you're using:

JCreator LE Users

The LE edition of JCreator does not permit you to define new document types, but you can change the default document file extension to .ASM. First, select Options from the Configure menu. Select Default under the Editor category:

Click on the "+" next to Default, and select Colors. Click the Reset All button:

Select Syntax in the left-hand pane. Click the arrow on the right side of the Syntax file entry, and select JC3asm6.syn from a list of syntax files:

(If you do not see the file in the list of available files, you probably forgot to download and copy the syntax file into JCreator's Syntax folder.)

Clic the OK button to save your settings. Open an assembly language source program and note the color settings. If you want to change the colors, return to the Options window just shown, and click the Open button. You will be able to view and edit the XML code in the syntax definition file.

 

JCreator Pro Users

(This information has not been updated for JCreator 3.)

If you're using JCreator Pro, select Options from the Configure menu. Select Documents in the left-hand pane of the Options dialog. Click on New.

The Document Wizard will lead you through the definition of a new document class. Enter the following information:

Label for document class: ASM source file
Document extensions: asm, lst
Select masm6.syn as the syntax file
Check the Syntax Highlighting option

Finish the wizard.

 

Return to Top