汇编网首页登录博客注册
yang5731的学习博客
博客首页博客互动【做检测题】论坛求助

我的博客

个人首页 |  我的文章 |  我的相册 |  我的好友 |  最新访客 |  文章收藏 |  论坛提问 |  友情链接 |  给我留言  
图片载入中
学习动态
最新留言
友情链接

[2010-09-08 03:26] 实验15

assume cs:code
code segment
start:  mov ax,0
        mov es,ax
        mov di,204h
        mov ax,cs
        mov ds,ax
        mov si,offset xint9
        mov cx,offset xint9end-offset xint9
        cld
        rep movsb
        push es:[9*4+2]
        push es:[9*4]
        pop es:[200h]        ;保存中断9的地址
        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
xint9:  
        push si
        push ax
        push cx
        push es
        
        
        in al,60h
        pushf                ;对应CALL中的iret
        call dword ptr cs:[200h]        ;CS=0
        cmp al,9eh
        jne s
        mov ax,0b800h
        mov es,ax
        mov cx,2000
        mov si,0
s1:     mov byte ptr es:[si],'A'
        add si,2
        loop s1
s:      pop es
        pop cx
        pop ax
        pop si
        
        iret
xint9end:       nop

code ends
end start
评论次数(0)  |  浏览次数(444)  |  类型(汇编作业) |  收藏此文  | 
 
 请输入验证码  (提示:点击验证码输入框,以获取验证码