SHARE
TWEET

Assemble Subtraction Key Board Input

naeem043 Feb 14th, 2019 14 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .MODEL SMALL
  2. .STACK 100H
  3.  
  4. .CODE
  5. MAIN PROC
  6.     MOV AH, 1  
  7.     INT 21H             ;INPUT ONE
  8.     MOV BL, AL                      
  9.    
  10.        
  11.     MOV AH, 2
  12.     MOV DL, 10    ; NEW LINE
  13.     INT 21H
  14.              
  15.     MOV DL, 13
  16.     INT 21H           ; BACK SPACE/CRET
  17.        
  18.     MOV AH, 1  
  19.     INT 21H             ;INPUT TWO
  20.     MOV CL, AL
  21.    
  22.     SUB BL,CL
  23.     ADD BL, 48 ;reduce when use big input as like 100 whose are greater than 9
  24.    
  25.     MOV AH, 2
  26.     MOV DL, 10    ; NEW LINE
  27.     INT 21H
  28.              
  29.     MOV DL, 13
  30.     INT 21H           ; BACK SPACE/CRET
  31.                  
  32.     MOV AH, 2
  33.     MOV DL, BL
  34.     INT 21H
  35.    
  36. MAIN ENDP
  37. END MAIN
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top