Masm32 Novice Guide

xiaoxiao2021-03-05  19

MASM32 Beginner's Guide Author: Purple Endurer, Hechi (2002.6.4) We must first of its profits. The following is some basic usage of Masm32. MASM32V8 Downloads Go to AOGO Station (3104K) This article mainly illustrates three points: 1. Basically how to build, assemble, link source files, and run-generated executables in Masm32. 2, how to open the Masm32 online help function 3, Chinese Qeditor menu 1, basic use method to establish TEST.ASM and generate TEST.EXE as an example under the C: / PWIN951 / TEMP folder. After installing Masm32, open "Resources Manager "or" My Computer ", enters the folder where MASM32 (assuming C: / Masm32), double-click the Qeditor.exe icon, which enters the Masm32 integrated development environment. ⒈ [Optional] Enter the resource file. Press the method store, note if the file name must be RSRC.RC if it is compiled in an integrated environment. ⒉ [Optional] Compile the resource file. Use the menu project on the menu bar Project -> Compile Resource File. At this time, the system opens a DOS window to run the relevant batch file and report the result. If the information is successful, the information is (the specific error message varies from error): Microsoft (R) Windows (R) Resource Compiler, Version 5.00.1823.1 - Build 1823copyright (c) Microsoft Corp. 1985-1998. All Rights reserved.using CodePage 936 As DefaultCreating Rsrc.resrc: RCPP -CP 936 -F C: // PWIN951 // Temp // RCA83947 -G C: // PWIN951 // Temp // RDA83947 -DRC_IN VOKED -D_WIN32 -PC / /: / - E -i. -I .rsrc.rc.rsrc.rc (1): Error RC2135: File Not Found: Mainicon.ico.writing Menu: 600, LANG: 0x409, Size 128Microsoft (R) Windows Resource To Object Converter Version 5.00 . 1736.1copyright (c) Microsoft Corp. 1992-1997. All rights reserved.cvtres: Fatal Error CVT1101: Cannot Open Rsrc.res for ReadingPress Any Key to Continue.................. And error messages. At any one button, turn off this DOS window and modify the resource file according to the error message, after the deployment, and recompile.

Success until the following information:. Microsoft (R) Windows (R) Resource Compiler, Version 5.00.1823.1 - Build 1823Copyright (C) Microsoft Corp. 1985-1998 All rights reserved.Using codepage 936 as defaultCreating rsrc.RESRC: RCPP -CP 936 -F C: / PWIN951 / TEMP / RCA81843 -G C: / PWIN951 / TEMP / RDA81843 -DRC_INVOKED -D_WIN32 -PC /: / -E -I. -I .rsrc.rc.writing Menu: 600, LANG: 0x409 Size 128Microsoft (R) Windows Resource To Object Converter Version 5.00.1736.1 Copyright (c) Microsoft Corp. 1992-1997. All rights reserved.press any key to contact,. At any one button, turn off this DOS window. ⒊ Enter the source program, then use the disk-shaped icon in the menu file -> Save or shortcut on the menu bar, the first time you need to enter the file name, pay attention to specify the extension .asm [this example C: /PWIN951/Temp/test.asm]. ⒋ assembly source program. Use the menu project on the menu bar Project -> Assemblier ASM file. At this time, the system opens a DOS window to run the relevant batch file. After the end, a window report result called "/masm32/bin/asmbl.txt" will pop up. If the assembly is unsuccessful, the display information is as follows (the specific error message varies from error): assembly: c: /pwin951/temp/test.asmc: /pwin951/temp/test.asm (60): Error A2006: undefined Symbol: NULLC: /PWIN951/TEMP/test.asm (60): error A2114: INVOKE argument type mismatch: argument: 1Volume in drive C is LIU Volume Serial Number is 4061-17D7Directory of C: / PWIN951 / TEMPTEST ASM 8,402 06-05- 02 19:29 Test.asm1 File (s) 13,010 bytes0 DIR (s) 24, 403, 968 BYTES Free includes detailed error information. Such as c: /pwin951/temp/test.asm (60): error A2006: undefined Symbol: NULL C: /PWIN951/Temp/test.asm is the file specifier of the source file file (60) where 60 is the source program The line number of the wrong statement error A2006 A2006 is the error type code undefined symbol: null For the specific error message, the corresponding line should be modified in these information modifications, and the storage is re-compiled.

Until the window displays the following successful information: assembly: c: /pwin951/temp/test.asmvolume in Drive C: 401-17d7directory of C: / PWIN951 / TEMPTEST ASM 8, 401 06-05-02 19:34 Test. Asmtest Obj 3,720 06-05-02 19:35 Test.obj2 File (s) 16,729 BYTES0 DIR (S) 22, 298, 624 BYTES Free Includes information about the newly generated target file Test.obj. ⒌Link the target file. Use the menu project on the menu bar Project -> Link Obj File. At this time, the system opens a DOS window running related batch file, and pops up the window of the window name "/masm32/bin/lnk.txt" is as follows: Volume In Drive C Is Liu Volume Serial Number IS 4061-17D7DIRECTORY OF C : / PWIN951 06-05-02 19:34 TEST.ASMTEST OBJ 3,720 06-05-02 19:35 Test.objtest EX 4,608 06-05-02 19:38 Test.exe3 File (s) 16,729 bytes0 DIR (s) 24, 395, 776 BYTES Free includes information about newly generated executable Test.exe. Note: No resource files do not belong to errors, so if your program assembly and links are completed smoothly, but do not see Go to the window, it is highly to put the window information in the resource file, but the resource file has not been compiled or compiled without success. ⒍ Run the generated executable. Using the menu project on the menu bar, Project -> Run Program. See the result of the program run? If you can't see the window, it is likely that you put the window information in the resource file, but the resource file has not been compiled or compiled without success. In summary, it is important to note that the source program file or resource file must be modified first, and then the subsequent operation, otherwise the error is still. The function and usage of other menu items in the Project menu: Assemble & Link assembled sources and links, suitable for resource files unmodified, but modify the source all-compiled resource files, assembly programs and links, apply to resource files CONSOLE LINK OBJ FILE Compilation Console Source Program & Console Assemble Link Compilation and Link Console Source Program Console Build All Generates Console Executable Procedures 2 API functions, many of the many functions, we are difficult to remember, only now. The MASM32 provides an online help feature, but must be set according to the corresponding settings to "trick". Press the function key F1 in Qeditor, pop up the dialog box, help files? HLP did not find? How to do? To do with me: Select Menu Tools -> Change Editor Settings, pop up the window named "Change Quick Editor Settings", find "F1 Help File =? Hhlp" item from the list box under DoubleClick Item to Edit, just now we look What is it? HLP is here, the original Masm32 does not know where our help files are placed, so we can only specify from our users themselves.

Double-click this, pop up a dialog box, enter the file specifier of the help file we use, [If me is "c: ///pin951//Help//win32.hlp", it is included with DLEPHI. ], Or click the "Browse ..." button to select from the Select File dialog box. After doing finished, click the "Save" button and close this window. Restart the Qeditor, locate the cursor in an API function name, such as messagebox, press the function key F1, help the information! Note: After modifying settings, you must restart, the new settings work III. The menu content of the Chinese Qeditor menu QEditor is saved in the file qeditor.ini, and the menu item text is changed to Chinese, and the Chinese is complete (of course you want Use the Chinese version of Windows. Since qeditor.ini is a very important file, you must back up before modifying, and be careful when modifying. Below is the original content of the Hanhua I will correspond to the menu item text of the Project menu. ; ------------------------------------------------- ------------------------------------------------------------------------------------------------------- -------------------------------------------------- - [editor settings] MASM32 Version 6Command.com011422768070 **** // PWIN951 // Help // Win32.hlp0 [menu settings]; ------------------- -----------------------------------------; File Paths SHOULD HAVE The Drive Added SO That The Relative; Paths Become Absolute Paths. This Allows the Tools To Be; Accessed from Different Drives On The Computer .; ------------------------- ----------------------------------- [& r Engineering] & r compile resource file, // masm32 // bin / /BRES.BAT {B} & A assembly source program file, // masm32 // bin // assmbl.bat {b} - & l link target file, // masm32 // bin // lnk.bat {b} assembly source program And link target files, // masm32 // bin // build.bat {b} & b compile resource file, assembly source program and link target file, // masm32 // bin // BLDALL.BAT {B} Run & makeit.bat Generate executables, makeit.bat- & o link console target file, // masm32 // bin // lnkc.bat {b} & C assembly and link console file, // mas M32 // bin // buildc.bat {b} & a one-step generation console executable file, // masm32 // bin // BLDALLC.BAT {B} - & r running program, {b} .exe [& tools] author blog :

http://blog.9cbs.net/purplendurer/

转载请注明原文地址:https://www.9cbs.com/read-39350.html

New Post(0)