COMO CONVIERTO LOS TIPOS STRING A INTEGER?
es verdad me faltaria incrementar SP
saludos
Para pasar el numero a ascii te tendrias que hacer una funcion que lo hiciera
PD: Lo de interger a string es solo una manera de decirlo ya que en ASM no existen
EDIT :
El codigo quedaria algo a si
org 100h
mov dx,8
call WordToString
mov ah,09
mov dx,lb2
int 21h
int 20h
ContarCantidad:
mov di,ax
mov si,0
.bucle:
xor dx,dx
mov bx,10
div bx
inc si
cmp ax,0
jne .bucle
;dec si
ret
;Le pasas el word por DX ;)
WordToString:
cmp dx,10
jle .UnoSolo
push dx
mov ax,dx
call ContarCantidad
pop dx
mov cx,-1
mov word[Cantidad],si
sub [Cantidad],2
.bucle:
push dx
dec si
inc cx
mov bx,1
mov dx,si
.Elevar:
dec dx
imul bx,10
cmp dx,0
jne .Elevar
pop dx
push dx
mov ax,dx
xor dx,dx
div bx
pop dx
mov di,lb2
add di,cx
mov byte[di],al
add byte[di],'0'
imul ax,bx
sub dx,ax
cmp [Cantidad],cx
jne .bucle
add dl ,'0'
mov di,lb2
add di,cx
mov byte[di+1],dl
.salir:
ret
.UnoSolo:
mov di,lb2
add dl,'0'
mov byte[di],dl
jmp .salir
Cantidad dw ?
lb2 db 200 dup ('$')