rafid_shad

Binary to decimal

Dec 11th, 2019
125
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. include 'EMU8086.INC'
  2. .model small
  3. .stack 100h
  4. .code
  5. main proc
  6.     mov bx,0
  7.     mov ah,1
  8.    
  9.     for1:
  10.     int 21h
  11.    
  12.     cmp al,13
  13.     je end_for1
  14.    
  15.     sub al,48
  16.     shl bx,1
  17.     or bl,al
  18.     jmp for1
  19.    
  20.     end_for1:
  21.     printn
  22.    
  23.     mov ah,2
  24.     add bl,48
  25.     mov dl,bl
  26.     int 21h  
  27.    
  28.     main endp
  29. end main
RAW Paste Data