汇编语言程序的程序壳

来源:互联网 发布:山东网络推广公司 编辑:程序博客网 时间:2024/04/30 04:56

;the form of an assembly language program 

; using simplified segment definition   使用简化的段定义

                          .MODEL SMALL         模式

                          .STACK  64                栈段

                          .DATA                        数据段

                          ;

                          ; place data definitions here    在这里开始定义数据

                          .CODE                                     代码段开始拉。

MAIN                  PROC     FAR                           ;this is  the program entry point   程序的入口点 

                          MOV       AX , @DATA              ;load the data segment address    这里载入数据段的地址

                          MOV       DS ,  AX                    ;assign value to DS                       给DS赋值拉。DS不可以直接载入值的。

                          ;

                          ; place code here                                                                            

                          ;

                          MOV  AH , 4CH                         ;set up to 

                          INT    21H                                ;return to DOS      将控制权返回给DOS

MAIN                  ENDP                                                      

                          END     MAIN                             ;this is the program exit point  伪指令END 向DOS标明入口点MAIN到此结束。 

原创粉丝点击