home *** CD-ROM | disk | FTP | other *** search
- /**
- *
- * Name scttywrt -- Write to screen using TTY format
- *
- * Synopsis iret = scttywrt(ch,fore);
- *
- * int iret Return value is always 0
- * char ch Character to display
- * int fore Foreground attribute to use if
- * screen mode is a graphics mode
- *
- * Description This function writes a character to the current page in
- * the usual TTY format.
- *
- * This function assumes that the current page is active
- * (i.e., currently displayed). Unexpected results may
- * occur otherwise.
- *
- * If the screen is in graphics mode, fore is used to set
- * the color of the characters written. Further, if the
- * current page is not active and the screen is scrolled,
- * fore is used as the color of the scrolled text. Fore is
- * ignored in text mode.
- *
- * If the screen is scrolled in text mode due to a line
- * feed character, the attribute for the new blank line is
- * taken from the character position last occupied before
- * the scroll. If the scroll is caused by overflowing the
- * last line of the screen, the attribute is taken from the
- * former attribute at column 0 of the last line.
- *
- * Special Line feed ('\012') causes the cursor to move down one
- * characters line, unless it is already on the bottom line of the
- * screen, in which case the screen is scrolled.
- *
- * Carriage return ('\015') causes the cursor to move to
- * column 0.
- *
- * Backspace ('\010') causes the cursor to move one column
- * to the left (non-destructively), unless it is already at
- * column 0, in which case nothing happens.
- *
- * The BEL character ('\007') causes the computer's bell to
- * sound.
- *
- * Returns iret Return value is always 0
- *
- * Version 6.00 (C)Copyright Blaise Computing Inc. 1983,1987,1989
- *
- **/
-
- #include <dos.h>
-
- #include <bscreens.h>
-
- int scttywrt(ch,fore)
- char ch;
- int fore;
- {
- union REGS inregs,outregs;
-
- inregs.h.ah = 14;
- inregs.h.al = ch;
- inregs.h.bh = (unsigned char) b_curpage;
- inregs.h.bl = (unsigned char) fore;
- int86(SC_BIOS_INT,&inregs,&outregs);
-
- return(0);
- }