Advertisement
sujonshekh

asci code ADDition and with single 2 value

Feb 3rd, 2017
508
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. ; add your code here  
  8.  
  9.  .data
  10.  msg db  0ah,0dh,"boom boom  enter 3 input $"  
  11.  
  12.  c1 db ?  
  13.  c2 db ?
  14.  
  15.  sum db ? ,'$'
  16.  
  17.  .code
  18.    
  19.    
  20.  mov ax,@data
  21.  mov DS,ax
  22.  
  23.  mov ah,2
  24.  mov dl,'?'
  25.  int 21h
  26.  
  27.  mov ah,1
  28.  int 21h
  29.  mov c1,al
  30.  
  31.  int 21h
  32.  mov c2,al  
  33.  
  34.  
  35.  add al,c1
  36.  sub al,30h
  37.  mov sum,al
  38.  
  39.   mov ah,9
  40.  lea dx,sum
  41.  
  42.  int 21h
  43.  
  44.  mov ah,4ch
  45.  int 21h
  46.  
  47.  
  48.        
  49.    
  50.  
  51. ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement