除法中断处理程序-asm
时间:12-01
来源:互联网
点击:
assume cs:code,ss:stack;关键在于处理中断的层层返回
stack segment
dw 16 dup(0)
stack ends
code segment
start:
mov ax,cs
mov ds,ax
mov ax,stack
mov ss,ax
mov sp,28h
mov si,offset do0
mov ax,0
mov es,ax
mov di,200h
mov cx,offset do0end-offset do0
cld
rep movsb
mov ax,0
mov es,ax
mov word ptr es:[0*4],200h
mov word ptr es:[0*4+2],0
calls1
mov ax,004ch
int 21h
do0:jmp short do0start
db "divvide error!"
do0start: mov ax,cs
mov ds,ax
mov si,202h
mov ax,0b800h
mov es,ax
mov di,3*160+2*2
mov cx,13
mov bl,5
s0:mov al,[si]
mov es:[di],al
inc di
mov es:[di],bl
inc si
incdi
loop s0
mov ax,004ch
int 21h
do0end:nop
s1: mov ax,0ffffh
mov dx,1
mov bx,1
div bx
ret
code ends
除法中断处理程序as 相关文章:
- Windows CE 进程、线程和内存管理(11-09)
- RedHatLinux新手入门教程(5)(11-12)
- uClinux介绍(11-09)
- openwebmailV1.60安装教学(11-12)
- Linux嵌入式系统开发平台选型探讨(11-09)
- Windows CE 进程、线程和内存管理(二)(11-09)