参考
hello32c.asm
comment *
MASM32 SDK
ml /c /coff hello32c.asm
link /subsystem:console hello32c
*
includelib <kernel32.lib>
.386
.model flat, stdcall
option casemap:none
include <windows.inc>
include <kernel32.inc>
.const
hello db "hello, world", 0dh, 0ah, 0
hello_len equ $ - hello
.data?
hConsoleOutput dd ?
written dd ?
.code
start:
invoke GetStdHandle, STD_OUTPUT_HANDLE
mov hConsoleOutput, eax
invoke WriteConsoleA, hConsoleOutput, addr hello, hello_len, addr written, NULL
invoke ExitProcess, 0
end start
最終更新:2018年08月26日 18:33