Advertisement
Guest User

output

a guest
Mar 28th, 2015
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. IDEAL
  2. MODEL small
  3. STACK 100h
  4. DATASEG
  5. Num equ 57
  6. ; --------------------------
  7. ; Your variables here
  8. ; --------------------------
  9. CODESEG
  10.  
  11.  
  12.  
  13. start:
  14.     mov ax, @data
  15.     mov ds, ax
  16. ; --------------------------
  17. ; Your code here
  18. ; --------------------------
  19.     xor cx,cx
  20.     mov ax,Num
  21.     convert:
  22.     mov bx,0ah
  23.     div bx
  24.     add dx,30h
  25.     push dx
  26.     inc cx
  27.     cmp ax,0
  28.     je output
  29.     jmp convert
  30.     output:
  31.     mov ah,2
  32.     pop dx
  33.     int 21h
  34.     loop output
  35.    
  36.    
  37. exit:
  38.     mov ax, 4c00h
  39.     int 21h
  40. END start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement