limpia.asm
Limpia.... no se... :D
;Autor Hector Torres
;URL
.model small
.stack
.data
nombre db 40 dup(' '),'$'
domicilio db 30 dup(' '),'$'
ciudad db 20 dup(' '),'$'
tel db 10 dup(' '),'$'
.code
.startup
leer proto c,cadena:ptr byte, cuanto: byte
print proto c,ADD_msj : ptr byte
gotoxy proto c, x: byte, y: byte
call clr
invoke gotoxy, 10,10
invoke leer,addr nombre,40
invoke gotoxy, 11,10
invoke leer,addr domicilio,30
invoke gotoxy, 12,10
invoke leer,addr ciudad,20
invoke gotoxy, 13,10
invoke leer,addr tel,10
invoke gotoxy, 15,10
invoke print, addr nombre
invoke gotoxy, 16,10
invoke print, addr domicilio
invoke gotoxy, 17,10
invoke print, addr ciudad
invoke gotoxy, 18,10
invoke print, addr tel
.exit
clr proc
mov ax,0003
int 10h
ret
clr endp
leer proc c, cadena:ptr byte,cuanto: byte
mov si,cadena
mov cl,0
.repeat
mov ah,01h
int 21h
.IF al != 13
mov [si],al ;escribe en la direccion de memoria
inc si
inc cl
.EndIf
.until (cl==cuanto) || (al==13)
ret
leer endp
print proc c,ADD_msj: ptr byte
mov ah,09h
mov dx,ADD_msj
int 21h
ret
print endp
gotoxy proc c, x: byte, y: byte
mov ah,02h
mov bh,0
mov dh,x
mov dl,y
int 10h
ret
gotoxy endp
end