. : : Assembly Language : : .  |  首页  |  我提出的问题  |  我参与的问题  |  我的收藏  |  消息中心   |  游客  登录  | 
刷新 | 提问 | 未解决 | 已解决 | 精华区 | 搜索 |
  《汇编语言》论坛 ->外中断
  管理员: assembly   [回复本贴] [收藏本贴] [管理本贴] [关闭窗口]
主题 : :  实验15. 不知道这样做符不符合题目要求  请高手们指正 谢谢!  [待解决] 回复[ 0次 ]   点击[ 245次 ]  
reborn1989
[帖 主]   [ 发表时间:2015-07-22 22:16 ]   [引用]   [回复]   [ top ] 
荣誉值:0
信誉值:0
注册日期:2015-06-16 22:24
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 nint9
    mov ax,0
    mov es,ax
    mov di,204h
    
    push es:[9*4]
    pop es:[200h]
    push es:[9*4+2]
    pop es:[202h]    
    
    cli
    mov es:[9*4],di
    mov es:[9*4+2],ax
    sti
    
    mov cx,offset nint9end-offset nint9
    cld
    rep movsb
        
    mov ax,4c00h
    int 21h
    
    nint9:
        
        push ax
        push es
        push di
        push cx
        mov ax,0b800h
        mov es,ax
        
        in al,60h     
        pushf
        call dword ptr cs:[200h]
        
        mov di,0
        cmp al,1eh
        je nint9ovr
            
        fulla:
        
            cmp al,9eh
            jne nint9ovr
            
            mov cx,2000       
                             
            l:
              
                mov byte ptr es:[di],'a'
                add di,2

            loop l
            
        nint9ovr:
        
            pop cx
            pop di
            pop es
            pop ax
            iret
            
    nint9end:
    
        nop
        
code ends

end start
需要登录后才能回帖 -->> 请单击此处登录
    Copyright © 2006-2024   ASMEDU.NET  All Rights Reserved