assume cs:code
code segment
mov ax,cs
mov ds,ax
mov si,offset itrpt
mov ax,0
mov es,ax
mov di,200h
mov cx,offset itrptend-offset itrpt
cld
rep movsb
mov ax,0
mov ds,ax
mov word ptr ds:[4*7ch+2],0
mov word ptr ds:[4*7ch],200h
mov ax,4c00h
int 21h
itrpt:
push ax
push dx
mov ax,0b800h
mov es,ax
mov al,160
mul dh
add dl,dl
mov dh,0
add ax,dx
mov di,ax
m: mov al,ds:[si]
cmp al,0
je n
mov es:[di],al
mov es:[di+1],cl
inc si
add di,2
jmp near ptr m
n: pop dx
pop ax
mov ax,4c00h
int 21h
iret
itrptend:nop
code ends
end
王爽《汇编语言》p262实验(1)我写的代码
最新推荐文章于 2024-03-01 14:14:03 发布