鱼C论坛

 找回密码
 立即注册
查看: 1566|回复: 1

好心人帮我看看这个程序,忙了一个多小时了,运行就崩溃

[复制链接]
发表于 2012-10-28 20:17:16 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
assume cs:code

stack segment
        db 128 dup(0)
stack ends

code segment
;----------installation--------       
        start:        mov ax,stack
                        mov ss,ax
                        mov sp,128
                       
                        push cs
                        pop ds
                        mov si,offset my_int9                ;ds:si = cs:offset my_int9
                       
                        mov ax,0
                        mov es,ax
                        mov di,200h                                        ;es:di=0:200h
                       
                        mov cx,offset tail - offset my_int9
                        rep movsb                                        ;installing....
                       
                        mov bx,offset adr
                       
                        push es:[9*4]
                        pop cs:[bx]                               
                        push es:[9*4+2]
                        pop cs:[bx+2]                                ;store cs:ip of old int9
                       
                        cli
                        mov es:[9*4],word ptr 200h                       
                        mov es:[9*4+2],word ptr 0        ;locate my_int9
                        sti
                       
                        mov ax,4c00h
                        int 21h
;----------my_int9-----------------

my_int9:        jmp go
        adr           dw 0,0                                                 ;cs:ip of old int9
                       
        go:                push ax
                        push es
                        push cx
                        push bx
                        push di
                       
                        in al,60h
                       
                        pushf
                        mov bx,offset adr
                        call dword ptr cs:[bx]     ;call int9
                       
                        cmp al,3bh
                        jnz int9ret
                        mov ax,0b800h
                        mov es,ax
                        mov di,1
                        mov cx,80*25
        color:        inc byte ptr es:[di]
                        add di,2
                        loop color
                                               
  int9ret:        pop di
                        pop bx
                        pop cx
                        pop es
                        pop ax
                        iret
        tail:        nop
       
code ends
end start       
                       
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
 楼主| 发表于 2012-10-28 20:20:31 | 显示全部楼层
有点长,谁帮我看看
真是挠头
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2024-10-8 02:28

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表