assume cs:code
code segment
mov ax,stack1
mov ss,ax
mov sp,256
mov ax,flend[2]
mov bx,head[2]
sub ax,bx
mov bx,16
mul bx
push ax
mov ax,head
mov bx,flend
cmp ax,bx
ja abov
sub bx,ax
pop ax
add ax,bx
adc dx,0
jmp below
abov: sub ax,bx
mov bx,ax
pop ax
sub ax,bx
below: mov bx,512
div bx
inc ax
mov ax,cs
mov es,ax
mov bx,offset head
mov ch,0
mov cl,2
mov dl,0
mov dh,0
mov ah,3
int 13h
mov ax,4c00h
int 21h
org 200h
head dd head
flend dd fileend
........................................
code ends
stack1 segment
dw 128 dup (0)
fileend db 0
stack1 ends
end
如上代码,目的是根据两个以段地址:偏移地址格式的地址相减得到两个地址之间的距离,abov标号处显示phase error between passes,感觉这里不会有什么毛病啊,其实这种问题其实出过不止一次了,只是之前都想办法绕过去了,这次不能忍了