. : : Assembly Language : : .  |  首页  |  我提出的问题  |  我参与的问题  |  我的收藏  |  消息中心   |  游客  登录  | 
刷新 | 提问 | 未解决 | 已解决 | 精华区 | 搜索 |
  《汇编语言》论坛 ->外中断
  管理员: assembly   [回复本贴] [收藏本贴] [管理本贴] [关闭窗口]
主题 : :  求解实验15  [已解决] 回复[ 3次 ]   点击[ 429次 ]  
liuquanhao7232
[帖 主]   [ 发表时间:2010-08-15 17:49 ]   [引用]   [回复]   [ top ] 
荣誉值:8
信誉值:0
注册日期:2010-07-12 08:47
因为没有DOS系统,所以大家帮下忙验证一下。

assume cs:code,ss:stack
stack segment
    db 128 dup (0)
stack ends
code segment
        start:mov ax,stack
              mov ss,ax
              mov sp,128
              mov ax,code
              mov ds,ax
              mov si,offset int9a
              mov ax,0
              mov es,ax
              mov di,204h
              mov cx,offset int9aend-offset int9a
              cld
              rep movsb
              
              push es:[9*4]
              pop es:[200]
              push es:[9*4+2]
              pop es:[202]
              
              cli
              mov word ptr es:[9*4],204h
              mov word ptr es:[9*4+2],0
              sti
              
              mov ax,4c00h
              int 21h
              
              
        int9a:push ax
              push bx
              push cx
              push es
              
              in al,60h
              
              pushf
              call dword ptr cs:[200h]
              
              mov ax,40h
              mov es,ax
              mov al,es:[17]
              cmp al,01000000b
              jne int9aend                    ;确定是否是输入大写
              
              cmp al,9Eh
              jne int9anext                  ;确定是否是放开A键
              
             s:mov cx,2000
              mov ax,0b800h
              mov es,ax
              mov bx,1
              mov byte ptr es:[bx],41H
              add bx,2
              loop s                           ;这个在整个屏幕显示A
              
         next:cmp al,1
              jne int9aend
              mov ax,0
              mov es,ax
              push es:[200]
              pop es:[9*4]
              push es:[202]
              pop es:[9*4+2]                 ;输入Eac则还原int 9例程的地址
              
     int9aend:pop es
              pop cx
              pop bx
              pop ax
              
              iret
              
code ends
end start
liuquanhao7232
[第1楼]   [ 回复时间:2010-08-15 17:51 ]   [引用]   [回复]   [ top ] 
荣誉值:8
信誉值:0
注册日期:2010-07-12 08:47
不好意思,改正一下。
assume cs:code,ss:stack
stack segment
    db 128 dup (0)
stack ends
code segment
        start:mov ax,stack
              mov ss,ax
              mov sp,128
              mov ax,code
              mov ds,ax
              mov si,offset int9a
              mov ax,0
              mov es,ax
              mov di,204h
              mov cx,offset int9aend-offset int9a
              cld
              rep movsb
              
              push es:[9*4]
              pop es:[200]
              push es:[9*4+2]
              pop es:[202]
              
              cli
              mov word ptr es:[9*4],204h
              mov word ptr es:[9*4+2],0
              sti
              
              mov ax,4c00h
              int 21h
              
              
        int9a:push ax
              push bx
              push cx
              push es
              
              in al,60h
              
              pushf
              call dword ptr cs:[200h]
              
              mov ax,40h
              mov es,ax
              mov al,es:[17]
              cmp al,01000000b
              jne int9aend                    ;确定是否是输入大写
              
              cmp al,9Eh
              jne int9anext                  ;确定是否是放开A键
              
             s:mov cx,2000
              mov ax,0b800h
              mov es,ax
              mov bx,1
              mov byte ptr es:[bx],41H
              add bx,2
              loop s                           ;这个在整个屏幕显示A
              
     int9next:cmp al,1
              jne int9aend
              mov ax,0
              mov es,ax
              push es:[200]
              pop es:[9*4]
              push es:[202]
              pop es:[9*4+2]                 ;输入Eac则还原int 9例程的地址
              
     int9aend:pop es
              pop cx
              pop bx
              pop ax
              
              iret
              
code ends
end start
liuquanhao7232
[第2楼]   [ 回复时间:2010-08-15 17:53 ]   [引用]   [回复]   [ top ] 
荣誉值:8
信誉值:0
注册日期:2010-07-12 08:47
额。。这个正确的。在50行那个。是int9anext
不好意思,改正一下。
assume cs:code,ss:stack
stack segment
    db 128 dup (0)
stack ends
code segment
        start:mov ax,stack
              mov ss,ax
              mov sp,128
              mov ax,code
              mov ds,ax
              mov si,offset int9a
              mov ax,0
              mov es,ax
              mov di,204h
              mov cx,offset int9aend-offset int9a
              cld
              rep movsb
              
              push es:[9*4]
              pop es:[200]
              push es:[9*4+2]
              pop es:[202]
              
              cli
              mov word ptr es:[9*4],204h
              mov word ptr es:[9*4+2],0
              sti
              
              mov ax,4c00h
              int 21h
              
              
        int9a:push ax
              push bx
              push cx
              push es
              
              in al,60h
              
              pushf
              call dword ptr cs:[200h]
              
              mov ax,40h
              mov es,ax
              mov al,es:[17]
              cmp al,01000000b
              jne int9aend                    ;确定是否是输入大写
              
              cmp al,9Eh
              jne int9anext                  ;确定是否是放开A键
              
             s:mov cx,2000
              mov ax,0b800h
              mov es,ax
              mov bx,1
              mov byte ptr es:[bx],41H
              add bx,2
              loop s                           ;这个在整个屏幕显示A
              
     int9next:cmp al,1
              jne int9aend
              mov ax,0
              mov es,ax
              push es:[200]
              pop es:[9*4]
              push es:[202]
              pop es:[9*4+2]                 ;输入Eac则还原int 9例程的地址
              
     int9aend:pop es
              pop cx
              pop bx
              pop ax
              
              iret
              
code ends
end start
liuquanhao7232
[第3楼]   [ 回复时间:2010-08-15 18:48 ]   [引用]   [回复]   [ top ] 
荣誉值:8
信誉值:0
注册日期:2010-07-12 08:47
此贴由 贴主 于 [ 2010-08-15 18:48 ] 结贴。 结贴原因:问题已解决
得分情况:
此问题已结贴!
    Copyright © 2006-2024   ASMEDU.NET  All Rights Reserved