Guest User

Untitled

a guest
Jul 21st, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. enteroAString:  ;traigo datos en AX
  2.        push BX
  3.        push CX
  4.        lea BX, [string_salida]     ;apunto a string_salida
  5.        mov DI, 1                   ;el indice empieza en 0
  6.        mov AX,8970
  7.        mov DX,0
  8.        while4:
  9.        cmp AX,0
  10.        jz  endwhile4
  11.         mov CX,10
  12.  
  13.         idiv cX           ;en DX quedo el resto!  y en AX el resultado
  14.         mov CX,AX
  15.        imul dx,30        ;multiplico DX por 30, el resultado se almacena en AX
  16.        mov [BX+DI], AX   ;guardo resultado en lugar que correesponde del string
  17.        mov AX,CX
  18.         mov CX, 10
  19.        inc di
  20.        inc DI
  21.        jmp while4
  22.  
  23.       endwhile4:
  24.       pop CX
  25.       pop BX
  26.       ret
Add Comment
Please, Sign In to add comment