第15章 外中断
assume cs:code
stack segment
  db 128 dup (0)
 stack ends
code segment
 start: ;mov ax,stack
         ;mov ss,ax
  push stack
  pop ss
  mov sp,128
 push cs
  pop ds
  
  mov ax,0
  mov es,ax
 mov si,offset int9
  mov di,204h
  mov cx,offset int9end-offset int9
  cld
  rep movsb
 push es:[9*4]
  pop es:[200h]
  push es:[9*4+2]
  pop es:[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 bx
  push cx
         push es
  
  in al,60h
  
  pushf
  call dword ptr cs:[200h]
 cmp al,9eh
  jne int9ret
         mov ah,2
         mov bh,0
         mov dh,0
         mov dl,0
         int 10h
 mov ah,9
  mov al,'A'
  mov bl,2
  mov bh,0
  mov cx,0f9fh
  int 10h
  
 int9ret:pop es
  pop cx
  pop bx
  pop ax
  iret
int9end:nop
code ends
 end start
 
文章来源: dujiahei.blog.csdn.net,作者:dujiahei,版权归原作者所有,如需转载,请联系作者。
原文链接:dujiahei.blog.csdn.net/article/details/45920725
- 点赞
 - 收藏
 - 关注作者
 
            
           
评论(0)