• Lunes 29 de Abril de 2024, 22:55

Autor Tema:  Mover Un Msj En La Pantallla  (Leído 1715 veces)

lexmejia

  • Nuevo Miembro
  • *
  • Mensajes: 8
    • Ver Perfil
Mover Un Msj En La Pantallla
« en: Jueves 9 de Noviembre de 2006, 04:07 »
0
wenas amigos del foro... keria saber si alguien me puede ayudar con un programita, ke el msj pueda ser ingresado desde el teclado, y a su vez que se pueda mover x la pantalla....

lexmejia

  • Nuevo Miembro
  • *
  • Mensajes: 8
    • Ver Perfil
Re: Mover Un Msj En La Pantallla
« Respuesta #1 en: Jueves 9 de Noviembre de 2006, 04:08 »
0
.model small
.stack
.data
msj1 db 13,10,'ingrese el mensaje:','$'
nombre db 25 dup(?)
car db 0
pox db 0
poy db 0
xa db 0
ya db 0

.code
inicio:

mov ax,@data
mov ds,ax ;habilita los datos de data

mov ah,0fh
int 10h
mov ah,0h
int 10h ;borrada la pantalla

mov ah,9 ; para ke ho aya desvordamiento de memoria

lea dx,msj1
call impre
mov si,0h;
mov bx,offset nombre

recibe1:
call captura
cmp al,0dh
je guarda1
mov [bx+si],al
inc si
jmp recibe1
guarda1:
mov byte ptr[bx+si],0

mov car, al
 mov ah, 03h
 mov bh,00h
 int 10h
 mov pox, ch
 mov poy, dh
 dec pox
 mov ah,05h
 mov al,01h
 int 10h

bucle:
  mov ah, 02h
  mov bh, 01h
  mov dh,ya
  mov dl,xa
  int 10h
  mov ah,02h
  mov bh,01h
  mov dh,poy
  mov dl,pox
  int 10h
  mov ah,02h
  mov dl,car
  int 21h
  mov ah,02h
  mov bh,01h
  mov dh,poy
  mov dl,pox
  int 10h
  mov xa,dl
  mov ya,dh
  mov ah,00h
  int 16h

cmp ah,75
jnz noleft
dec pox
jmp bucle

noleft:
cmp ah,72
jnz nodown
dec poy
jmp bucle

nodown:
cmp ah,77
jnz noright
inc pox
jmp bucle

noright:
cmp ah,80
jnz noup
inc poy
jmp bucle

noup:
cmp al,27
jz fin
jmp bucle


call muestra
mov dx,offset nombre
call impre
impre:
mov ah,9h
int 21h
ret
captura:
mov ah,1h
int 21h
ret
muestra:
mov ah,2h
int 21h
ret
fin:
mov ah , 4ch
int 21h
end inicio


;tengo este codigo pero me tira muchos errores...

Bicholey

  • Moderador
  • ******
  • Mensajes: 1234
    • Ver Perfil
Re: Mover Un Msj En La Pantallla
« Respuesta #2 en: Jueves 9 de Noviembre de 2006, 09:22 »
0
Porque simplemente no recibes un mensaje por el teclado lo guardas, lo imprimes y limpias pantalla y lo vuelves a imprimir en un lugar diferente y hara el efecto de que se mueve por la pantalla.
[size=109]LOS GATOS SIEMPRE CAEMOS DE PIE !!![/size]


lexmejia

  • Nuevo Miembro
  • *
  • Mensajes: 8
    • Ver Perfil
Re: Mover Un Msj En La Pantallla
« Respuesta #3 en: Jueves 9 de Noviembre de 2006, 19:35 »
0
simplemente xq no es eso lo ke me estan pidiendo... pero wenooo gracias x tu ayuda...