第十五章例题的疑问,最后不能退回到dos界面
assume cs:codestack 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
popds
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:
popds:
push es:
popds:
cli
mov word ptr es:,offset newint9
mov word ptr es:,cs
sti
mov ax,0b800h
mov es,ax
mov ah,'a'
s: mov es:,ah
call delay
inc ah
cmp ah,'z'
jna s
cli
push ds:
popes:
push ds:
popes:
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:
cmp al,1
jna s2
mov ax,0b800h
mov es,ax
inc byte ptr es:
s2:pop es
pop bx
pop ax
iret
newint9end:nop
code ends
end start
"C:\Users\31762\Desktop\QQ浏览器截图20190315152759.png" "C:\Users\31762\Desktop\QQ浏览器截图20190315152759.png"
页:
[1]