home *** CD-ROM | disk | FTP | other *** search
/ Power Programming / powerprogramming1994.iso / progtool / pctech / pctj1188.arc / INCSTRTA.C < prev    next >
C/C++ Source or Header  |  1988-09-06  |  681b  |  28 lines

  1. #include        <conio.h> 
  2.  
  3.  
  4. unsigned char SetCRTCReg( int, unsigned char ); 
  5.  
  6. main() 
  7.         int     i; 
  8.  
  9.  
  10.         /* increment the Start Address value (CRTC registers 0CH and 0DH) */ 
  11.         /*  by 80 in each loop iteration */ 
  12.  
  13.         for( i=0; i<=15; i++ ) 
  14.         { 
  15.           SetCRTCReg( 0x0C, (80*i)>>8 );        /* high-order byte */ 
  16.           SetCRTCReg( 0x0D, (80*i)&0xFF );      /* low-order byte */ 
  17.  
  18.           while( !kbhit() );                    /* wait for a keypress */ 
  19.           getch(); 
  20.         } 
  21.  
  22.         /* restore the screen origin to zero */ 
  23.         SetCRTCReg( 0x0C, 0 ); 
  24.         SetCRTCReg( 0x0D, 0 ); 
  25.  
  26.