- 4


| vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv |

| |

-----------------------------------------------------------------

. 8-2 .

/* ,

*/

#include "dos.h"

#define BLUE 1

#define GREEN 2

#define RED 4

#define INTENSE 8

#define BLUE_BACK 16

#define GREEN_BACK 32

#define RED_BACK 64

#define BLINK 128

#define UP 0

#define DOWN 1

void mode(),color_puts(),palette(), read_cursor_xy();

void goto_xy(),size_cursor(),scroll_window();

main()

int i,j;

mode(3); /* , */

size_cursor(0,3);

goto_xy(0,0);

color_puts(" - \n",BLUE |RED | INTENSE);

for ( i=0;i<22;i++)

for ( j=0;j<79;j++)

printf("%c",i+'a');

printf("\n");

getche();

scroll_window(10,10,50,15,3,DOWN);

getche();

/* */

void color_puts(s,color)

char *s; /* */

char color; /* */

union REGS r;

char x,y;

read_cursor_xy(&x,&y); /*

ࠠ */

while (*s)

if (*s == '\n') /*

*/

printf("\n");

s++;

x = 0; y++; /* */

continue;

r.h.ah = 9;/* */

r.h.al = *s++; /* */

r.h.bl = color; /* */

r.h.bh = 0; /* 0 */

r.x.cx = 1; /* */

int86(0x10,&r,&r);

x++;