好心人帮我看看这个程序,忙了一个多小时了,运行就崩溃
assume cs:codestack 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:
pop cs:
push es:
pop cs: ;store cs:ip of old int9
cli
mov es:,word ptr 200h
mov es:,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: ;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:
add di,2
loop color
int9ret: pop di
pop bx
pop cx
pop es
pop ax
iret
tail: nop
code ends
end start
有点长,谁帮我看看
真是挠头
页:
[1]