home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / qc_prog / chap14 / writestr.c < prev   
Encoding:
C/C++ Source or Header  |  1988-04-07  |  394 b   |  15 lines

  1. /*  writestr.c -- writes string and attribute using DMA */
  2. /*  write the string str with attribute attr at         */
  3. /*  location pstart -- uses pointer notation.           */
  4.  
  5. typedef unsigned int (far * VIDMEM); 
  6.  
  7. void Write_str(pstart, attr, str)
  8. VIDMEM pstart;
  9. unsigned short attr;
  10. char *str;
  11. {
  12.     while (*str != '\0')
  13.         *pstart++ = (attr << 8) | (*str++ & 0x00FF);
  14. }
  15.