martes, 27 de febrero de 2018

practica del dia 27 de febrero en emu 8086






codigo:

pila segment stack 'stack'
db 100h dup (?)
pila ends
datos segment
    titulo db 13,10,'CAMBIAR FONDO DE PANTALLA',13,10,10,'Menu:',13,10,10,'$'
    mensaje db '1.-Pantalla Azul y letras Rosas',13,10,'2.-Pantalla Morada y Letras Amarillas ',13,10,'3.-Pantalla Aqua y Letras Celestes',13,10,'4.-Pantalla Roja y Letras Verdes',13,10,10,'Para salir, presione cualquier tecla...',13,10,'$'
datos ends
codigo segment ;segmento de codigo
assume cs:codigo, ss:pila, ds:datos
    inicio:
         mov ah,0
         mov al,3h
         int 10h
         mov ax,0600h
         mov bh,0fh
         mov cx,0000h
         mov dx,184Fh
         int 10h
         mov ah,02h
         mov bh,00
         mov dh,00
         mov dl,00
         int 10h

            mov ax,datos
            mov ds,ax
            lea dx,titulo
            mov ah,9h
            int 21h
            lea dx,mensaje
            mov ah,9h
            int 21h
             mov ah,08
             int 21h
             cmp al,49
             je llamarAzul
            cmp al,50
            je llamarMorado
            cmp al,51
            je llamarAqua
            cmp al,52
            je llamarRojo
            jmp fin

            fin:
            mov ax,4c00h
            int 21h
            llamarAzul:
            CALL AZULPROC
            llamarMorado:
            CALL MORADOPROC
            llamarAqua:
            CALL AQUAPROC
            llamarRojo:
            CALL ROJOPROC
         
         
            AZULPROC PROC NEAR
            mov ah,0
             mov al,3h
             int 10h
             mov ax,0600h
             mov bh,0fh
             mov cx,0000h
             mov dx,184Fh
             int 10h
             mov ah,02h
             mov bh,00
             mov dh,00
             mov dl,00
             int 10h
            mov ah,06h
            mov bh,1dh
            mov cx,0000h
            mov dx,184fh
            int 10h
            mov ax,4c00h
            int 21h
            RET
            AZULPROC ENDP

            MORADOPROC PROC NEAR
            mov ah,0
             mov al,3h
             int 10h
             mov ax,0600h
             mov bh,0fh
             mov cx,0000h
             mov dx,184Fh
             int 10h
             mov ah,02h
             mov bh,00
             mov dh,00
             mov dl,00
             int 10h
            mov ah,06h
            mov bh,5eh
            mov cx,0000h
            mov dx,184fh
            int 10h
            mov ax,4c00h
            int 21h
            RET
            MORADOPROC ENDP
         
            AQUAPROC PROC NEAR
            mov ah,0
             mov al,3h
             int 10h
             mov ax,0600h
             mov bh,0fh
             mov cx,0000h
             mov dx,184Fh
             int 10h
             mov ah,02h
             mov bh,00
             mov dh,00
             mov dl,00
             int 10h
            mov ah,06h
            mov bh,3bh
            mov cx,0000h
            mov dx,184fh
            int 10h
            mov ax,4c00h
            int 21h
            RET
            AQUAPROC ENDP
         
            ROJOPROC PROC NEAR
             mov ah,0
             mov al,3h
             int 10h
             mov ax,0600h
             mov bh,0fh
             mov cx,0000h
             mov dx,184Fh
             int 10h
             mov ah,02h
             mov bh,00
             mov dh,00
             mov dl,00
             int 10h
            mov ah,06h
            mov bh,4ah
            mov cx,0000h
            mov dx,184fh
            int 10h
            mov ax,4c00h
            int 21h
            RET
            ROJOPROC ENDP
            codigo ends
             end inicio

No hay comentarios:

Publicar un comentario

Trabajo con puerto usb

Programación de puerto USB USB viene de frase en Ingles “Universal Serial Bus” que se utiliza para describir un tipo de puerto en la co...