1. 程式人生 > >16位彙編 cmp jne實現判斷和迴圈

16位彙編 cmp jne實現判斷和迴圈

je ZF=0則跳轉    jne ZF=1則跳轉

assume cs:code, ds:data  
  
data segment  
    db 'Hello,test'  
data ends  
  
code segment  
      
    start:  
      
    mov ax,10h
    mov bx,01h
	
    s:
     inc bx

    test ax,bx
    jne s
    
      
    mov ax,4c00h  
    int 21h  
code ends  
  
end start  
  
end