王爽的<汇编语言>中的中断处理
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
mov cx,offset do-offset do0
cld
rep movsb
mov word ptr es:[0*4],200H
mov word ptr es:[0*4+2],0
mov ax, 10H
mov bx, 0
div bx
do0: jmp short do0start
db 'overflow!'
do0start:
mov ax,0
mov ds,ax
mov si,202H
mov ax,0b800H
mov es,ax
mov di,12*160+36*2
;mov byte ptr es:[13*160+40*2], '*'
;mov byte ptr es:[11*160+40*2], '*'
mov cx,9
s: mov al,[si]
mov es:[di],al
inc si
add di,2
loop s
mov ax,4c00H
int 21H
do: nop
code ends
end start
阅读(1084) | 评论(0) | 转发(0) |