实验13(2)
本帖最后由 雪球丶 于 2020-3-19 16:07 编辑assume cs:code
code segment
start:
mov ax,cs
mov ds,ax
mov si,offset do0
mov ax,0
mov es,ax
mov di,200h ;将do0写到0:200处
mov cx,offset do0end-offset do0
cld
rep movsb
;设置中断向量表
mov ax,0
mov es,ax ;将es指向中断向量表
mov word ptr es:,200h ;发生7ch中断时跳转到0:200处执行
mov word ptr es:,0
mov ax,4c00h
int 21h
;cx循环次数
;bx位移
do0:
push bp
mov bp,sp
dec cx
cmp cx,0
je ok
add ,bx
ok: pop bp
iret
do0end: nop
code ends
end start
页:
[1]