Fork me on GitHub

汇编语言编写Hello World

 1 ;=================================
 2 ; HELLO world
 3 DATAS segment
 4     string DB 'HELLO World','$'
 5 DATAS ends
 6 
 7 CODES segment
 8 START:
 9     mov ax,DATAS
10     mov ds,ax
11 
12     Lea dx,string;将待输出字符串的偏移地址放入DX中
13     mov AH,09    ;09号功能调用
14     INT  21H
15 
16     MOV  AL,0   ;置退出码
17     MOV  AH,4CH ;置功能调用号
18     INT  21H    ;软中断指令:实施功能调用
19 CODES ends
20     end START

 

posted @ 2019-01-08 16:11  粥里有勺糖  阅读(745)  评论(0编辑  收藏  举报