|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
assume cs:code
stack segment
db 128 dup(0)
stack ends
data segment
dw 0,0
data ends
code segment
start:
mov ax,stack
mov ss,ax
mov sp,128
mov cx,offset newint9end-offset newint9
push cs
pop ds
mov si,offset newint9
mov di,204h
mov ax,0
mov es,ax
cld
rep movsb
mov ax,data
mov ds,ax
mov ax,0
mov es,ax
push es:[4*9]
pop ds:[0]
push es:[4*9+2]
pop ds:[2]
cli
mov word ptr es:[4*9],offset newint9
mov word ptr es:[4*9+2],cs
sti
mov ax,0b800h
mov es,ax
mov ah,'a'
s: mov es:[160*12+40*2],ah
call delay
inc ah
cmp ah,'z'
jna s
cli
push ds:[0]
pop es:[4*9]
push ds:[2]
pop es:[4*9+2]
sti
mov ax,4c00h
int 21h
delay: mov cx,0ffffh
s1: nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
loop s1
ret
newint9:push ax
push bx
push es
pushf
pushf
in al,60h
pop bx
and bh,11111100b
push bx
popf
call dword ptr ds:[0]
cmp al,1
jna s2
mov ax,0b800h
mov es,ax
inc byte ptr es:[160*12+40*2+1]
s2:pop es
pop bx
pop ax
iret
newint9end:nop
code ends
end start
|
|