Probe into the Windows System Programming (2) Hello World

xiaoxiao2021-03-05  22

The developing tools that I have in study are VC6.0 and TASM, so the routine code in the article is C / C or ASM, which may be very

More friends have less contact with ASM (special time Win32 ASM), so I have to give a "Hello, World" written by ASM, so that big

Home has a probably aware of Win32 ASM. .386 .Model flat; API declaration EXTRN MessageBoxa: proc EXTRN EXITPROCESS: Proc null = 0 MB_OK = 0 .data; Data Definition Szmessage DB "Hello, World!", 0 Sztitle DB "Win32 ASM Application", 0 .code; code Start _start:

Messageboxa (NULL, SZMESSAGE, SZTITLE, MB_OK) PSUH MB_OK PUSH OFFSET SZTITLE PUSH OFFSET SZMESSAGE PUSH NULL CALL MESSAGEBOXA; EXITPROCESS (0) Push 0 Call EXITPROCESS End _Start

The above code is compiled and run, and a message box of "Hello, Wold" will pop up, which is very simple, just for two Windows.

The call to the API. In fact, under the Win32 platform, if we leave the Windows API, we basically inch, but if it is just

For the call to the API, do handles on some interfaces, we can use other development tools such as VC, VB or Delphi, which will be convenient

More! Win32ASM naturally has its unique, read the tutorial, you may find its charm.

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

New Post(0)