Advertisement
sujonshekh

hex to decimal assebly prog $#@!

Feb 10th, 2017
561
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. ; You may customize this and other start-up templates;
  3. ; The location of this template is c:\emu8086\inc\0_com_template.txt
  4.  
  5. org 100h
  6.  
  7. .data
  8.  msg db  0ah,0dh,'Enter a hex digit CApital Word Only $'  
  9.  msg2 db 0ah,0dh, 'IN decimal it is 1'
  10.  c1 db ?,'$'
  11.  
  12.  .code
  13.    
  14.    
  15.  mov ax,@data
  16.  mov DS,ax         ;
  17.  
  18.  mov ah,9
  19.  lea dx,msg  ;msg er jonow print
  20.  int 21h
  21.  
  22.  mov ah,1   ;single Char input
  23.  int 21h    ; every input output process here
  24.  
  25.  
  26.  sub al,11h
  27.  mov c1,al
  28.  
  29.  mov ah,9
  30.  lea dx,msg2      ;msg2 er jono print hobey
  31.  int 21h
  32.  
  33.  
  34.        
  35.    
  36.  
  37. ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement