用masm32汇编语言如何实现在控制台输出
1个回答
展开全部
你好下面是一个输出hello world的汇编代码。
.386
.model flat,stdcall
option casemap:none
include msvcrt.inc
includelib msvcrt.lib
include kernel32.inc
includelib kernel32.lib
.data
szText1 db "hello world",0Ah,00h
szPause db "pause",0Ah
.code
testdd:
push offset szText1
call crt_printf
add esp,4
push offset szPause
call crt_system
add esp,4
ret
end testdd
end
.386
.model flat,stdcall
option casemap:none
include msvcrt.inc
includelib msvcrt.lib
include kernel32.inc
includelib kernel32.lib
.data
szText1 db "hello world",0Ah,00h
szPause db "pause",0Ah
.code
testdd:
push offset szText1
call crt_printf
add esp,4
push offset szPause
call crt_system
add esp,4
ret
end testdd
end
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询