home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c329 / 2.img / EXAMPLES / CALLDTTY.C < prev    next >
Encoding:
C/C++ Source or Header  |  1989-08-15  |  952 b   |  33 lines

  1. /*
  2.  * CALLDTTY.C
  3.  * Purpose: demonstrate calling assembly language
  4.  * instead of using int386 function
  5.  * Copyright (C) MicroWay, Inc. 1989
  6.  *
  7.  */ 
  8.  
  9. #include <stdio.h>
  10. #include <dos.h>
  11.  
  12. #define    VIDEO_IO 0x10   /* interrupt # for ROM BIOS video services */
  13. #define BRIGHT    1<<3    /* intense attribute for screen chars */
  14. #define BLINKON 1<<7    /* blinking attribute on for screen chars */
  15. #define BLINKOFF 0x7f    /* blinking attribute off for screen chars */
  16. #define DEFAULT 0xff    /* leave attribute bits on if they are on */
  17.  
  18. extern void display_tty(); /* forward reference */
  19.  
  20. main ()
  21. {
  22.     printf ("A horse that can count to 10 is a remarkable ");
  23.     fflush(stdout);    /* force C to flush output buffer */
  24.     display_tty (BRIGHT,DEFAULT,"horse");
  25.     printf("\n");
  26.     printf("not a remarkable ");
  27.     fflush(stdout);    /* force C to flush output buffer */
  28.     display_tty (BRIGHT,DEFAULT,"mathematician.");
  29.     printf(" - Dr. Samuel Johnson\n");
  30.  
  31. }
  32.     
  33.