. : : Assembly Language : : .  |  首页  |  我提出的问题  |  我参与的问题  |  我的收藏  |  消息中心   |  游客  登录  | 
刷新 | 提问 | 未解决 | 已解决 | 精华区 | 搜索 |
  《汇编语言》论坛 ->外中断
  管理员: assembly   [回复本贴] [收藏本贴] [管理本贴] [关闭窗口]
主题 : :  为什么要debug??  [待解决] 回复[ 3次 ]   点击[ 470次 ]  
hedgehog
[帖 主]   [ 发表时间:2008-02-04 22:33 ]   [引用]   [回复]   [ top ] 
荣誉值:0
信誉值:0
注册日期:2008-01-29 16:38
assume cs:codesg,ss:stacksg

stacksg segment
        db 128 dup (0)
stacksg ends

codesg segment
main:                mov ax,stacksg
                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]
                pop es:[200h]
                push es:[9*4+2]
                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

int9:                push ax
                push bx
                push cx
                push es

                in al,60h
                pushf
                call dword ptr cs:[200h]

                cmp al,1
                jne int9_ret
                mov ax,0b800H
                mov es,ax
                mov bx,1
                mov cx,2000
int9_s:        inc byte ptr es:[bx]
                add bx,2
                loop int9_s

int9_ret:        pop es
                pop cx
                pop bx
                pop ax
                iret
int9_end:        nop

codesg ends
end main

这个程序能运行 跟书上代码也大致一样 但就是我按下Esc不会变色 但是在debug模式下会变色 这是为何呢  请高人赐教
hedgehog
[第1楼]   [ 回复时间:2008-02-04 22:36 ]   [引用]   [回复]   [ top ] 
荣誉值:0
信誉值:0
注册日期:2008-01-29 16:38
对了 其他有些程序(要求在屏幕上显示)也是这样 运行时不显示  我用了debug之后  运行又可以显示了  不是是不是系统问题
ppt
[第2楼]   [ 回复时间:2008-02-04 23:24 ]   [引用]   [回复]   [ top ] 
荣誉值:56
信誉值:0
注册日期:2007-09-23 18:23
这个问题涉及到 保护模式 屏幕的页 什么的.
我的做法是打开个命令提示符 先运行一下debug推出或者edit退出
在运行直接写显存的程序就好了.或者直接运行command.com也就是command就没有这个问题了.
hedgehog
[第3楼]   [ 回复时间:2008-02-05 10:47 ]   [引用]   [回复]   [ top ] 
荣誉值:0
信誉值:0
注册日期:2008-01-29 16:38
这样啊  明白了 谢了 ppt
需要登录后才能回帖 -->> 请单击此处登录
    Copyright © 2006-2024   ASMEDU.NET  All Rights Reserved