fork download
  1. .model small
  2. .stack 100
  3. .data
  4. count db 0
  5.  
  6. .code
  7. main proc
  8. mov ax, @data
  9. mov ds, ax
  10.  
  11. mov cl,10 ;divide by
  12. mov ax,12346
  13.  
  14. again1:
  15. mov dx,0 ;puting 0 in the high part of the divided number (DX:AX)
  16. div cx ;DX:AX/cx. ax=dx:ax/cx and dx=dx:ax%cx(modulus)
  17. add dl, 30h ;adding the '0' char for printing
  18. push dx
  19. inc count
  20. cmp ax,0
  21. jne again1
  22.  
  23. again2:
  24. pop dx
  25. mov ah, 2
  26. int 21h
  27. dec count
  28. cmp count, 0
  29. jne again2
  30.  
  31. mov ah, 4ch
  32. int 21h
  33.  
  34. main endp
  35. end main
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.asm:1: error: attempt to define a local label before any non-local labels
prog.asm:1: error: parser: instruction expected
prog.asm:2: error: attempt to define a local label before any non-local labels
prog.asm:2: error: parser: instruction expected
prog.asm:3: error: attempt to define a local label before any non-local labels
prog.asm:7: error: parser: instruction expected
prog.asm:34: error: symbol `main' redefined
prog.asm:34: error: parser: instruction expected
prog.asm:35: error: parser: instruction expected
stdout
Standard output is empty