assume cs:code ;要求cx=循环数,bx=跳转偏移值
data segment
;input data segment code here
data ends
stack segment
;input stack segment code here
stack ends
code segment
start:mov ax,code
mov ds,ax
mov si,offset d7int
mov ax,20h
mov es,ax
mov di,0
mov cx,offset d7end-offset d7int
rep movsb
mov ax,0
mov es,ax
mov es:[7dh*4],200h
mov es:[7dh*4+2],0
mov ax,0b800h
mov ds,ax
mov si,160*12
mov cx,80
mov bx,offset s-offset se
s: mov byte ptr [si],'!'
add si,2
int 7dh
se:nop
mov ax,4c00h
int 21h
d7int:cmp cx,1
dec cx
je no
mov bp,sp
add ss:[bp],bx
no:iret
d7end:nop
code ends
end start |