Advertisement
naeem043

Assemble Separate big input by 3 digit

Feb 22nd, 2019
116
0
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.     INCLUDE 'EMU8086.INC'  
  7.    
  8.     MOV CL, '0' ; 30H = 0
  9.     MOV BL, '1'
  10.    
  11.     L1:
  12.         CMP BL, '9'   ;39H = 9
  13.         JG EXIT  
  14.         CMP CL, '3'  ; 33H = 3
  15.         JE NEWLINE
  16.        
  17.         MOV AH, 2
  18.         MOV DL, BL
  19.         INT 21H
  20.        
  21.         INC BL
  22.         INC CL
  23.        
  24.         JMP L1
  25.    
  26.     NEWLINE:
  27.         PRINTN ''
  28.        
  29.         MOV CL, '0'
  30.         JMP L1
  31.        
  32.    
  33.        
  34.     EXIT:
  35.         MOV AH, 4CH
  36.         INT 21H
  37.        
  38.    
  39. END MAIN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement