Ensamblador - CODIGO DESPLAZAR TEXTO EN PANTALLA

 
Vista:

CODIGO DESPLAZAR TEXTO EN PANTALLA

Publicado por MarioF (1 intervención) el 18/11/2008 20:47:03
HOLA A TODOS... NECESITO EL CODIGO EN ENSAMBLADOR QUE PERMITA QUE UN TEXTO PUEDA DESPLAZARSE EN PANTALLA POR SI SOLO... UTILIZANDO LA CONSOLA DEL MSDOS.. LES AGRADECERIA MUCHISIMO YA QUE ES UN TRBAJO DE PARCIALES...
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:CODIGO DESPLAZAR TEXTO EN PANTALLA

Publicado por MSH (120 intervenciones) el 23/11/2008 04:10:15
Hace tiempo vi un código asm muy bueno, pero no se a quien pertenece, por lo que pido a esa persona se reporte en el foro para darle reconocimiento a su trabajo.

El código va más o menos así:
----------------------------------------------------------------------------------------------------------------------
code segment public 'CODE'
assume CS:code,DS:code;,ES:code,SS:code

org 100h
begin:
.386
mov al,13h
int 10h

;Comienzo de paleta 60,40,40, color 230
mov cl,255
mov bx,3f27h ;60,40

@pal0:
mov dx,03C8H
mov al,cl
cli
out dx,al
inc dx
mov al,bh
out dx,al
mov al,bl
out dx,al
out dx,al
sti
dec cx
cmp cl,69
ja short @pal0

mov bl,bh
sar bl,1
dec bh
jns short @pal0
;Fin de paleta

mov ah,9
mov dx,OFFSET Nombre
int 21h

@inicio:
mov bh,9h ;950h
inc dx
@l1:
mov ax,0a000h
mov es,ax
mov ds,ax

mov di,bx
scasb
je short @term
imul di,bx,5

sub di,dx
mov ax,10
sub al,bh
sal al,3
mov ds:[di+42245],ax ;42245
mov ds:[di+42885],ax ;42885
add di,dx

mov cx,7
add di,22410
@dib:
imul si,si,371
ror si,3
mov ax,si
and ax,0010000000100000b ;;rand de 32
add ax,4b4bh ;75

stosw
stosw
stosb
sub di,325
loop short @dib

@term:
dec bx
jnz short @l1

;************llama al fuego***********************

mov bh,0fh
@loop0:
mov ax,ds:[bx]
add al,ah
xor ah,ah
sal ax,4 ;visualizacion del fuego 4,50
mov cl,34 ;que tanto fuego
div cl

cmp al,7 ;7
jb short @skip

mov ah,al
mov ds:[bx-1],ax
mov ds:[bx-321],ax
mov ds:[bx-641],ax

@skip:
inc bx
inc bx
cmp bh,130
jbe short @loop0
;********************************** termino de fuego

in ax,60h ;Leo el teclado
cmp al,1
jnz @inicio

mov ax,03h
int 10h

ret

Nombre db ' *MSH*$'

code ENDS

END begin

---------------------------------------------------------------------------------------------------------------------
;personalmente, es uno de los mejores programitas COM que he visto
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar