分别用两种执行后返回DOS的方法,书写一个程序在显示器上输入字符OK

来源:百度知道 编辑:UC知道 时间:2024/05/03 22:57:35

code segment
assume cs:code
org 100h
start:
push cs
pop ds
lea dx,Mes0
mov ah,9
int 21h ;输出显示OK
mov ah,1
int 21h
mov ah,4ch
int 21h ;返回DOS
Mes0 db 'OK $'
code ends
end start
;*****************************
data segment
Mes0 db 'OK $';输出显示
data ends

code segment
assume cs:code,ds:data
start:
mov ax,data
mov ds,ax
cld
lea si,Mes0
mov cx,2
next:lodsb
mov ah,0eh
int 10h
loop next
mov ah,1
int 21h
int 20h ;返回DOS
code ends
end start