Advertisement
salmancreation

rang if else in emu8086 jl,lg,jmp,equal

Oct 26th, 2016
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.54 KB | None | 0 0
  1. .DATA
  2. .MODEL SMALL
  3.  
  4. INPUT_M DB 10,13,'ENTER CHARACTER',0DH,0AH,'$'  
  5. MESSAGE1 DB 10,13,'YOU TYPED'
  6. CHAR DB "  ", '$'
  7.  
  8. .CODE
  9. MAIN PROC    
  10.    
  11.     MOV AX,@DATA
  12.     MOV DS,AX
  13.    
  14.     MOV AH,9
  15.     MOV DX,OFFSET INPUT_M
  16.     INT 21H
  17.    
  18.     MOV AH,01
  19.     INT 21H
  20.     MOV CHAR,AL
  21.     CMP CHAR,'A'
  22.        
  23.     JL EQUAL
  24.     CMP CHAR,'Z'
  25.     JG EQUAL
  26.     MOV DX,OFFSET MESSAGE1
  27.     MOV AH,9
  28.     INT 21H
  29.    
  30.     EQUAL:
  31.     JMP END
  32.  
  33.   END:    
  34.    
  35.     MOV AX,4CH
  36.     INT 21H  
  37.    
  38.    
  39.     MAIN ENDP
  40. END MAIN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement