Textpad and MASM build Assembly Environment

Source: Internet
Author: User

Download masm615 and textpad. We recommend that you use textpad in English. The following uses textpad 5.4 as an example to describe how to build the compiling environment.

After textpad is installed, the startup interface is as follows:

I. type filtering: *. ASM file format is supported.

Click Configure-> preferecence... (1) Open the settings panel, select filenamefilter in the list on the left, and add support for *. ASM format (2 ).

Figure 1

Figure 2

After this setting, the *. ASM file format is optional in the dialog box when the file is saved.

Ii. Highlight keywords

First, copy the masm6.syn file to the system directory under the textpad installation directory. If you do not have the masm6.syn file, search for it.

Click Configure-> new document class... (3) to open another settings panel, and enter a name indicating the assembly language. Here you may enter MASM (4) and click Next.

Figure 3

Figure 4

Next, enter the wildcard *. ASM (5) and click Next, check enable syntax hignlighting to highlight the Assembly Language keyword, and select the newly added masm6.syn (6) from the syntax definition file drop-down menu ), click Next to display an Information summary page. Click OK.

Figure 5

Figure 6

3. Set the font and color

Click Configure-> preferecence .... (1) Open the settings panel, select Document class/MASM/font in the list on the left, and set the font to the expected type (7 ), in the same way, you can modify the display color of keywords (8 ).

Figure 7

Figure 8

4. Add the compile and run tools

This is the most important setting. The first three steps are not at most because the compilation process is not beautiful and comfortable, but does not affect the function. However, if you do not perform Step 4, You need to press the doscommand very hard each time. Especially when you switch the path frequently, you may want to think about it if you are not used to the command line operation.

Still click Configure-> preferecence .... (1) Open the settings panel and select tool in the list on the left. The upper right part of the panel has an add drop-down menu. Select DOS command ..., in the displayed window, enter c: \ masm615 \ make32.bat $ basename (9 ). $ Basename indicates the name of the current document. Before it is the absolute path of make32.bat, it depends on where you copy masm615. I put it in the C: \ masm615 directory. It seems that some people say that placing a drive C may cause some problems. If you encounter special circumstances, you can change the masm615 path according to the actual situation.

Figure 9

Click Add-> DOS command again... and output $ basename (10). $ basename indicates the name of the compiled program.

Figure 10

Next, rename the two newly added tools to compile and run (11). You can also use other names as long as they can help you differentiate them.

Figure 11

In the last step, it is recommended that you deselect the capture output (12) Check In tools> compile and run, so that the command line window is automatically displayed every time, so that you can easily observe the compilation and running results.

Figure 12

All the preceding settings are required. Compile a program example. ASM, then click tools-> external tools-> compileexam examexamexample ,,、examexamexamexamexamexamexample.exe. Click Tools-> external tools-> run on the menu bar to run the generated program, you will see that eax = 30000 H (13) is the expected result. The font and color shown in Figure 13 are also more beautiful.

Figure 13

Liuzhushiqiang's experiences:

At the beginning, I didn't copy the MASM TO THE C drive. As a result, the "ML is not an internal or external command, or a program or batch file that can be run" error occurs during compilation, finally, copy the masm to the c drive and compile and run it successfully.

 

Post reposted from: Click to open the link

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.