实验15,照书打的,可是不对
汇编语言第二版实验15按照书打的
然而
运行起来却按F1却没用
一下是代码
assume cs:cosesg
stack segment
db 128 dup (0)
stack ends
cosesg segment
start:mov ax,stack
mov ss,ax
mov sp,128
push cs
pop ds
mov si,offset int9
mov ax,0
mov es,ax
mov di,204h
mov cx,offset int9end - offset int9
cld
rep movsb
push es:
pop es:
push es:
pop es:
cli
mov word ptr es:,204h
mov word ptr es:,0
sti
mov ax,4c00h
int 21h
int9: push ax
push bx
push es
push cx
in al,60h
mov bx,0
mov es,bx
pushf
call dword ptr es:
cmp al,3bh
jne int9ret
mov bx,0b800h
mov es,bx
mov bx,1
mov cx,2000
s: inc byte ptr es:
add bx,2
loop s
int9ret:pop cx
pop es
pop di
pop bx
pop ax
iret
int9end:nop
cosesg ends
end start
擦,我要报警了,又打了一遍却过了,求解释
assume cs:codesg
stack segment
db 128 dup(0)
stack ends
codesg segment
start:mov ax,stack
mov ss,ax
mov sp,128
push cs
pop ds
mov si,offset int9
mov ax,0
mov es,ax
mov di,204h
mov cx,offset int9end - offset int9
cld
rep movsb
push es:
pop es:
push es:
pop es:
cli
mov word ptr es:,204h
mov word ptr es:,0
mov ax,4c00h
int 21h
int9: push ax
push es
push bx
push cx
mov bx,0
mov es,bx
pushf
call dword ptr es:
in al,60h
cmp al,3bh
jne int9ret
mov ax,0b800h
mov es,ax
mov bx,1
mov cx,2000
s: inc byte ptr es:
add bx,2
loop s
int9ret:pop cx
pop bx
pop es
pop ax
iret
int9end:nop
codesg ends
end start
可能是哪里没编对,或者符号使用错误,没有看出来。 呵呵我来关注一下 haolihai 书上,会不会太多了,你打错了
页:
[1]