. : : Assembly Language : : .  |  首页  |  我提出的问题  |  我参与的问题  |  我的收藏  |  消息中心   |  游客  登录  | 
刷新 | 提问 | 未解决 | 已解决 | 精华区 | 搜索 |
  《汇编语言》论坛 ->外中断
  管理员: assembly   [回复本贴] [收藏本贴] [管理本贴] [关闭窗口]
主题 : :  实验15.,,求鉴定!!!  [待解决] 回复[ 1次 ]   点击[ 250次 ]  
knight00
[帖 主]   [ 发表时间:2012-05-20 21:06 ]   [引用]   [回复]   [ top ] 
荣誉值:0
信誉值:0
注册日期:2012-05-14 19:41
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 ax,0
         mov es,ax
         mov si,offset int9
         mov di,204h
         mov cx,offset int9_end - offset int9
         cld
         rep movsb

          push es:[9*4] 
          push es:[9*4+2] 
          pop es:[202h]                             
          pop es:[200h]  
         
         cli 
             mov word ptr es:[9*4],204h 
             mov word ptr es:[9*4+2],0 
         sti  
         mov ax,4c00h
        int 21h

       int9:jmp short int9_start
             db "QWERTYUIOP0000ASDFGHJKL00000ZXCVBNM"
  
  int9_start: push ax
              push bx
              push cx
              push si
              push es
             in al,60h
           
             pushf
             call dword ptr cs:[200h]

             mov ah,al
             mov cl,7 
             shr ah,cl;取扫描码 第7位
             cmp ah,1;判断是否为断码
             jne int9_ret

                  sub al,80h
                  sub ah,ah
                  sub al,16
                  mov si,ax

                  mov bx,0b800h
                  mov es,bx
                  mov cx,2000
                  sub bx,bx
                  mov ah,2
               s: 
                  mov al,cs:[206h+si]                 
                  mov es:[bx],ax
                  add bx,2
                  loop s
                 jmp short int9_ret

      
         int9_ret: pop es
                   pop si
                   pop cx
                   pop bx
                   pop ax
         
                iret

         int9_end:nop
code ends

end start
tomato
[第1楼]   [ 回复时间:2012-05-21 00:24 ]   [引用]   [回复]   [ top ] 
荣誉值:405
信誉值:0
注册日期:2008-01-19 14:51
没问题哦!
需要登录后才能回帖 -->> 请单击此处登录
    Copyright © 2006-2024   ASMEDU.NET  All Rights Reserved