Talk about Win32 compilation

Source: Internet
Author: User

Recently contacted the Win32 assembly, only to know that the Assembly must be related to the peace platform, such as the application is related to the operating system and CPU type, and the operating system is only related to the CPU type. For the "microcomputer Principle" in the compilation, that is the DOS assembly, and the Win32 assembly is based on the Windows assembly. DOS and windows are two completely different operating systems.

The implementation of DOS assembly relies on the soft interrupt provided by DOS system, the DOS program is a single task facing the process, while the implementation of WIN32 assembly depends on the WINAPI, the basic element is the assembly instruction related to the specific CPU type (generally X86, because Microsoft supports this ~ ~). Then remember a few common X86 assembly instructions, combined with WIN32API can write the program. Of course, in what programming environment? General Urban MASM32 SDK, this is the latest version is Vison11 (i downloaded in 2014.9.3), of course, this and Microsoft does not have much to do with, is maintained by cattle people ~~http://www.masm32.com/

Of course, in the real beginning of programming, but also pay attention to the MASM programming format, well, recommend a good book "Cut gallstone-windows Environment 32-bit assembly language programming"

(In fact, the format is not complex, the language grammar is not complex, the main body or winapi~~ but at this time the call API is more fastidious, not we in Visual C + + call can be, but also to consider some, such as the return value is too large ~ ~ This will define a buffer to store the return value ~ ~ Oh, is not the degree of control is very high AH ~ ~

What's the use of learning this? Wouldn't it be convenient to use visual c++ide and write programs in high-level languages? Luo Yunbin, author of the Stone Builder, explains that the Win32 compilation is the only option when we are doing encryption, decryption, reverse engineering, viruses, trojans and other harmful Code analysis and prevention work under Windows. (Gee, 360 will want you, beg to thirst AH ~ ~). Well, some game development estimates are also used (the process is the most important user experience ~ ~) Well, as for me, this is in the code is very helpful, unable to run the program, only to see his assembly code, this is the ultimate debugging ~ ~

DOS era of predecessors holding is "DOS interrupt Daquan", the Windows era will be prepared "Microsoft Win32 Programmer ' s Reference", this in my here have to download, in other sites download a lot of can not open the normal ~ Ah, So arduous to find a can use, also shared out, you do not have to find. Hey ~, all is the case, the operating system for us to block the hardware differences, encapsulated a lot of features, this is good, this brings is that we have to hold its thick to it as the standard, good and it run through the ~ ~

Speaking of DOS, that operating system is good (ah, Windows reserved The Black window called the console, not MS-DOS operating system Oh, in this console some DOS instructions are not executed ~ ~) dos good? Hey, small, 40KB about, hehe, used in embedded ~ ~ But X86 architecture embedded chip does not. Well, one day I don't know if I can use arm instructions to rewrite it, let it run on the STM32, haha, have time, have the mood when try ~ ~ (Note that MS-DOS assembly source Microsoft is published, Microsoft donated it to the United States Computer Museum ~ ~ This I also downloaded, interested can continuously I, But one day I am free, share it! There is also a point is, DOS no system code of protected Area, what meaning, is that you can modify the system code, or put your own code into the system code to run, all programs have the same permissions, access to all resources, this has a program can modify their own code ~ ~ (Old-American sci-fi movies are often not the legend ha ~ ~), and Win32 based on 80386 and above the processor priority, Windows and Intel cooperation bar, Windows running at level 0, is the most advanced, can access all resources, and the user program can only be in the lowest, 3 levels, The code at this level has a lot of limitations, well, most importantly, it can only read and write variable areas, except that they can't write. ~ ~)

Haha, that's it ~ ~ about the Win32 compilation of Feelings on the written here, specifically to learn, suggest that we hold "cut gallstone-windows Environment 32-bit assembly language programming" area chew it! (By the way, Lao Luo This person (is the author of the book), is the first to destroy the telecommunications system and arrested hackers oh, ah, technology is always unable to endure loneliness? Gossip news link http://news.xinhuanet.com/newscenter/2002-04 /23/content_369622.htm)

Talk about Win32 compilation

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.