. : : Assembly Language : : .  |  首页  |  我提出的问题  |  我参与的问题  |  我的收藏  |  消息中心   |  游客  登录  | 
提问 | 未解决 | 已解决 | 精华区 | 搜索 |
  《汇编语言》论坛 ->外中断
主题 : :  修改向量表0000:9*8的时候为什么报错呢?  [待解决] 回复[ 10次 ]   点击[ 922次 ]  
drier
[帖 主] [ 发表时间:2007-10-05 18:12 ] 
荣誉值:4
信誉值:0
注册日期:2007-09-01 15:38
assume cs:code
code segment
start:                  mov ax,cs
                        mov ds,ax
                        mov si,offset newInt0
                        mov ax,0
                        mov es,ax
                        mov di,200h
                        mov cx,offset int0ending-offset newInt0
                        rep movsb
                        mov es:[9*4],200h
                        mov es:[9*4+2],0         ------->运行到这里的时候的时CS:IP报错
                        int 9
                        mov ax,4c00h
                        int 21h
newInt0:                push ax
                        push es
                        push bp
                        OriginalINTAddress: db 0,0,0,0
                        mov si,offset OriginalINTAddress
                        mov ax,0
                        mov es,ax
                        push es:[9*4]
                        pop cs:[si]
                        push es:[9*4+2]
                        pop cs:[si+2]
start0:                 pushf
                        call dword ptr cs:[si]
                        in al,60h
                        cmp al,1
                        jz buffer
                        pop bp
                        pop es
                        pop ax                        
                        iret
buffer:                 mov ax,0b800h
                        mov es,ax
                        mov bp,178*21
                        mov es:[bp],'!'
                        pop bp
                        pop es
                        pop ax
                        iret
                        
int0ending:nop
code ends
end start
sunshine
[第5楼] [ 回复时间:2007-10-07 13:16 ] 
荣誉值:106
信誉值:0
注册日期:2007-06-26 15:10
mov es:[9*4],200h 
 mov es:[9*4+2],0  
你先把这两个地方该了,增加word ptr 看看还有什么错误
需要登录后才能回帖 -->> 请单击此处登录
    Copyright © 2006-2024   ASMEDU.NET  All Rights Reserved