. : : Assembly Language : : .  |  首页  |  我提出的问题  |  我参与的问题  |  我的收藏  |  消息中心   |  游客  登录  | 
刷新 | 提问 | 未解决 | 已解决 | 精华区 | 搜索 |
  《汇编语言》论坛 ->外中断
  管理员: assembly   [回复本贴] [收藏本贴] [管理本贴] [关闭窗口]
主题 : :  关于15.5安装新的int9中断例程的问题  [待解决] 回复[ 1次 ]   点击[ 266次 ]  
chengzi7737
[帖 主]   [ 发表时间:2011-12-21 16:04 ]   [引用]   [回复]   [ top ] 
荣誉值:0
信誉值:0
注册日期:2011-11-13 17:15
想问一下在执行到 
      cli
      mov word ptr es:[9*4],204h
      mov word ptr es:[9*4+2],0
      sti
这段程序的时候为什么会显示说是无效指令
assume cs:code

stack segment
    db 128 dup (0)
stack ends

code segment
start:mov ax,stack
      mov ss,ax
      mov sp,128
      
      push cs
      pop ds
      mov si,offset int9                 ;设置ds:si指向源地址
      mov ax,0                
      mov es,ax
      mov di,204h                        ;设置es:di指向目的地址
      mov cx,offset int9end-offset int9  ;设置cx为传输长度
      cld                                ;设置传输方向为正
      rep movsb
      
      push es:[36]
      pop ds:[200h]
      push es:[38]
      pop ds:[202h]
      
      cli
      mov word ptr es:[9*4],204h
      mov word ptr es:[9*4+2],0
      sti
      
      mov ax,4c00h
      int 21h
      
int9:push ax
     push es
     push bx
     push cx
     in al,60h
     
     pushf
     call dword ptr cs:[200h]          ;当此中断执行时(cs)=0
     
     cmp al,3bh
     jne int9ret
     
     mov ax,0b800h
     mov es,ax
     mov bx,1
     mov cx,2000
  sn:inc byte ptr es:[bx]
     add bx,2
     loop sn
     
int9ret:pop cx
        pop bx
        pop es
        pop ax
        iret
        
int9end:nop

code ends
end start
tomato
[第1楼]   [ 回复时间:2011-12-22 23:07 ]   [引用]   [回复]   [ top ] 
荣誉值:405
信誉值:0
注册日期:2008-01-19 14:51
这个是无法单步跟踪的,因为是替换键盘中断处理程序,如果单步跟踪是要随时调用键盘中断处理程序的。
需要登录后才能回帖 -->> 请单击此处登录
    Copyright © 2006-2024   ASMEDU.NET  All Rights Reserved