今天是第9天,突破15章.附上实验15代码
assume cs:code
stack segment
db 128 dup (0)
stack ends
code segment
start:mov ax,0
mov es,ax
mov ax,es:[4*9]
mov es:[200h],ax
mov ax,es:[4*9+2]
mov es:[202h],ax
mov di,204h
mov si,offset int9
mov ax,cs
mov ds,ax
mov cx,offset int9_end-offset int9
cld
rep movsb
cli
mov word ptr es:[4*9],204h
mov word ptr es:[4*9+2],0
sti
mov ax,4c00h
int 21h
int9:push ax
push bx
push cx
push es
pushf
mov ax,0
mov es,ax
in al,60h
call dword ptr es:[200h]
sub al,80h
cmp al,1eh
jne int9_exit
mov ax,0b800h
mov es,ax
mov bx,0
mov cx,2000
s:mov byte ptr es:[bx],'A'
add bx,2
loop s
int9_exit:pop es
pop cx
pop bx
pop ax
iret
int9_end:nop
code ends
end start |