+ -
当前位置:首页 → 问答吧 → 求一个显示“Hello world!”的简单汇编程序

求一个显示“Hello world!”的简单汇编程序

时间:2011-06-19

来源:互联网

汇编书上的例子太长了,简化了老久,都不对,麻烦谁帮忙给个汇编范例啊!
要求是:汇编程序运行时,按下Ctrl+F7时候,显示“Hello world!”能不能简短一点,几十行的汇编程序!
谢谢了!

作者: sun550202839   发布时间: 2011-06-19

Assembly code

assume  cs:code
code    segment
start:
msg     db      'hello,world!$'
        push cs
        pop ds
        mov dx,offset msg
        mov ah,9
        int 21h
        mov ah,4ch
        int 21h
code    ends
end     start

作者: masmaster   发布时间: 2011-06-19

引用 1 楼 masmaster 的回复:

Assembly code

assume cs:code
code segment
start:
msg db 'hello,world!$'
push cs
pop ds
mov dx,offset msg
mov ah,9
int 21h
mov ah,4ch
……

这........不是这样子啊,我要按下ctrl+F7才显示的啊,你这个一看就晓得不对呢!

作者: sun550202839   发布时间: 2011-06-19