应用举例:在屏幕的第12行,显示data段中以0结尾的字符串。
assume cs:code data segment
db 'conversation',
data ends code segment start:
mov ax, data
mov ds, ax
mov si,
mov ax, 0b800h
mov es, ax
mov di, * s:
cmp byte ptr [si],
je ok
mov al, [si]
mov es:[di], al
inc si
add di,
mov bx, offset s-offset ok
int 7ch ok:
mov ax, 4c00h
int 21h code ends
end start
安装程序
assume cs:code code segment start:
mov ax, cs
mov ds,ax
mov si,offset do0
mov ax,
mov es,ax
mov di,200h
mov cx,offset do0end-offsetdo0
cld
rep movsb mov ax,
mov es,ax
mov word ptr es:[7ch*],200h
mov word ptr es:[7ch*+], mov ax,4c00h
int 21h do0:
push bp
mov bp,sp
add [bp+],bx pop bp
iret mov ax,4c00h
int 21h do0end:
nop code ends
end start