19.04.2018 Views

Tutorial de ensamblador

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Programa con opciones para seleccionar color <strong>de</strong> fondo<br />

pila segment stack 'stack'<br />

db 100h dup (?)<br />

pila ends<br />

datos segment<br />

titulo db 13,10,'<br />

CAMBIAR FONDO DE PANTALLA<br />

',13,10,'$'<br />

mensaje db 'Presione ENTER si quiere la pantalla azul. Si<br />

quiere morado, presione 2',13,10,'Para salir, presione cualquier<br />

tecla',13,10,'$'<br />

datos ends<br />

codigo segment<br />

;segmento <strong>de</strong> codigo<br />

assume cs:codigo, ss:pila, ds:datos<br />

inicio:<br />

mov ah,0<br />

mov al,3h<br />

int 10h<br />

mov ax,0600h<br />

mov bh,0fh<br />

mov cx,0000h<br />

mov dx,184Fh<br />

int 10h<br />

mov ah,02h<br />

mov bh,00<br />

mov dh,00<br />

mov dl,00<br />

int 10h<br />

mov ax,datos<br />

mov ds,ax<br />

lea dx,titulo<br />

mov ah,9h<br />

int 21h<br />

lea dx,mensaje<br />

mov ah,9h<br />

74

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!