新聞中心

EEPW首頁 > 嵌入式系統(tǒng) > 設(shè)計應(yīng)用 > 除法中斷處理程序-asm

除法中斷處理程序-asm

作者: 時間:2016-12-01 來源:網(wǎng)絡(luò) 收藏
assume cs:code,ss:stack;關(guān)鍵在于處理中斷的層層返回

stack segment
dw 16 dup(0)
stack ends

本文引用地址:http://m.butianyuan.cn/article/201612/324231.htm

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



關(guān)鍵詞: 除法中斷處理程序as

評論


技術(shù)專區(qū)

關(guān)閉