| 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 MASMFirst, you will add a command named Build 16-bit MASM to the Tools menu in JCreator.
Click the OK button to close the Options dialog. Step 1A: Test your new commandOpen 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 MASMNext, you will add a command named Debug 16-bit MASM to the Tools menu in JCreator.
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 commandAssuming 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 MASMYou'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:
The following screen snapshot shows the setup for the Build 32-bit MASM command:
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 3A: Test the "Build 32-bit MASM" commandOpen 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 MASMYou'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:
The following, for example, is the complete path on a sample computer to the Visual Studio.Net debugger:
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" commandAssuming 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 MASMYou'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:
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 HighlightingA 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.
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:
|