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模式下会变色 这是为何呢 请高人赐教 |