home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 9 / CDACTUAL9.iso / share / Dos / VARIOS / lente / BAK / RAIZ.ASM < prev    next >
Encoding:
Assembly Source File  |  1996-05-12  |  613 b   |  45 lines

  1. .MODEL SMALL
  2. .STACK 200h
  3.  
  4. .DATA
  5.         Valor DW 0356
  6.         Raiz DB ?
  7.  
  8. .CODE
  9. ProcRaiz PROC
  10.         mov bx,Valor
  11.         xor cx,cx
  12. @bucle:
  13.         inc cl
  14.         mov ax,cx
  15.         mul cl
  16.         cmp ax,bx
  17.         jle @bucle
  18.         dec cl
  19.         mov Raiz,cl
  20.         ret
  21. ProcRaiz ENDP
  22.  
  23. Codigo PROC
  24.         mov ax,@DATA
  25.         mov ds,ax
  26.  
  27.         CALL ProcRaiz
  28.  
  29.         mov al,Raiz
  30.         add ax,30h
  31.         xor dx,dx
  32.         mov dl,al
  33.         xor ax,ax
  34.  
  35.         mov ah,02h
  36.         int 21h
  37.  
  38.         mov ah,4Ch
  39.         int 21h
  40. Codigo ENDP
  41.         END Codigo
  42.  
  43.         
  44.  
  45.