home *** CD-ROM | disk | FTP | other *** search
- /*
- * CALLDTTY.C
- * Purpose: demonstrate calling assembly language
- * instead of using int386 function
- * Copyright (C) MicroWay, Inc. 1989
- *
- */
-
- #include <stdio.h>
- #include <dos.h>
-
- #define VIDEO_IO 0x10 /* interrupt # for ROM BIOS video services */
- #define BRIGHT 1<<3 /* intense attribute for screen chars */
- #define BLINKON 1<<7 /* blinking attribute on for screen chars */
- #define BLINKOFF 0x7f /* blinking attribute off for screen chars */
- #define DEFAULT 0xff /* leave attribute bits on if they are on */
-
- extern void display_tty(); /* forward reference */
-
- main ()
- {
- printf ("A horse that can count to 10 is a remarkable ");
- fflush(stdout); /* force C to flush output buffer */
- display_tty (BRIGHT,DEFAULT,"horse");
- printf("\n");
- printf("not a remarkable ");
- fflush(stdout); /* force C to flush output buffer */
- display_tty (BRIGHT,DEFAULT,"mathematician.");
- printf(" - Dr. Samuel Johnson\n");
-
- }
-
-