Advertisement
madmaxhasan

Hexa To Decimal

Feb 3rd, 2018
336
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .MODEL SMALL
  2. .STACK 100
  3.  
  4. .DATA
  5.  
  6.     MSG1 DB "ENTER NUMBER ON HEXADECIMAL ( CAPITAL ) : $"
  7.     MSG2 DB 10,13,"IN DECIMAL : 1",
  8.     NUM DB ?,"$"
  9.  
  10. .CODE
  11.  
  12. MAIN PROC
  13.    
  14.     MOV AX, @DATA
  15.     MOV DS, AX
  16.    
  17.     LEA DX, MSG1
  18.     MOV AH, 9
  19.     INT 21H
  20.    
  21.     MOV AH, 1
  22.     INT 21H
  23.     SUB AL, 11H
  24.     MOV NUM, AL
  25.    
  26.     LEA DX, MSG2
  27.     MOV AH, 9
  28.     INT 21H
  29.    
  30.     MOV AH, 4CH
  31.     INT 21H
  32.    
  33. MAIN ENDP
  34. END MAIN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement