home *** CD-ROM | disk | FTP | other *** search
- /*▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
- ▒▒ ▒▒
- ▒▒ Ejemplo de uso de los planos en MODOX. ▒▒
- ▒▒ ▒▒
- ▒▒ 1996 Compiler SoftWare ▒▒
- ▒▒ ▒▒
- ▒▒ Creado con Borland C 3.1, pero creo que funcionará con todos los de ▒▒
- ▒▒ Borland a partir de la v2.0, y con Turbo C/C++. ▒▒
- ▒▒ ▒▒
- ▒▒ Ver COMPILER.NFO ▒▒
- ▒▒ ▒▒
- ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒;-)▒▒▒▒
- */
-
- #include <stdio.h>
- #include "MODOX.H"
-
-
- /* Función principal */
-
-
- void main( )
- {
- unsigned int x;
-
- Set_320x200X();
-
- outportb( 0x3c4, 0x02 ); /* función seleccionar plano */
- outportb( 0x3c5, 15 ); /* 1111b = 4 planos */
-
- for(x=1 ; x<80 ; x++) /* 80 puntos de 4 planos */
- {
- asm {
- mov ax, 0xa000
- mov es, ax
- mov di, x /* offset = x */
- mov ax, di /* color = x */
- stosb /* poner punto */
- }
- }
-
-
- outportb( 0x3c4, 0x02 ); /* función seleccionar plano */
- outportb( 0x3c5, 5 ); /* 0101b = planos 1 y 3*/
-
- for(x=1 ; x<80 ; x++) /* 80 puntos de 2 planos */
- {
- asm {
- mov ax, 0xa000
- mov es, ax
- mov di, x /* offset = x */
- mov ax, di /* color = x */
- add di, 8000 /* linea 100 (le sumamos 80*100)*/
- stosb /* poner punto */
- }
- }
-
-
- asm xor ax, ax
- asm int 16h
- asm mov ax , 3
- asm int 10h /* volvemos al modo 3 de texto*/
-
- }
-
-