+ -
当前位置:首页 → 问答吧 → 关于Phase error between passes的二义性错误

关于Phase error between passes的二义性错误

时间:2011-01-15

来源:互联网

Assembly code
assume cs:abc
abc segment
start:mov ah,0
      int 16h
      cmp al,'s'  ;按s键结束
      je over
      cmp al,'r'
      jne green 
      call word ptr subred
      jmp short start
green:cmp al,'g'
      jne blue
      call word ptr subgreen
      jmp short start
 blue:cmp al,'b'
      jne start
      call word ptr subblue
      jmp short start

 over:mov ax,4c00h
      int 21h       
subred:push ax
      push bx
      push cx
      push es
      mov ax,0b800h
      mov es,ax
      mov bx,1
      mov cx,2000
   s1:mov byte ptr es:[bx],04h
      add bx,2
      loop s1
      pop es
      pop cx
      pop bx
      pop ax
      ret
      
subgreen:push ax
      push bx
      push cx
      push es
      mov ax,0b800h
      mov es,ax
      mov bx,1
      mov cx,2000
   s2:mov byte ptr es:[bx],02h
      add bx,2
      loop s2
      pop es
      pop cx
      pop bx
      pop ax
      ret  
      
subblue:push ax
      push bx
      push cx
      push es
      mov ax,0b800h
      mov es,ax
      mov bx,1
      mov cx,2000
   s3:mov byte ptr es:[bx],01h
      add bx,2
      loop s3
      pop es
      pop cx
      pop bx
      pop ax
      ret
      
abc ends
end start       



以上提示错误,在green:cmp al,'g'
  blue:cmp al,'b'
  over:mov ax,4c00h

同一个错误,二义性!

段名是唯一的呀,怎么会出现这个错误呀?求高手解惑了~~~

作者: w597766166   发布时间: 2011-01-15

何种编译器编译的啊,ML.EXE可以啊,没错误提示啊.
要有问题估计也不是那三个标号的问题,是那三个CALL的问题!

作者: nanlingcg   发布时间: 2011-01-15

在MASM5.0汇编时会提示上述的错误,但在ML6.15版本汇编能通过,是编译版本的问题。

作者: BAYNPU   发布时间: 2011-01-15