home *** CD-ROM | disk | FTP | other *** search
- /**
- *
- * Name scwrite -- Write copies of a character
- *
- * Synopsis iret = scwrite(ch,cnt);
- *
- * int iret Return value is always 0
- * char ch Character to write
- * unsigned cnt Number of copies of ch to write
- *
- * Description SCWRITE displays cnt copies of the character ch on the
- * current display screen without changing the
- * currently-set attribute. The characters are written on
- * the current page starting at the current cursor
- * position.
- *
- * Unexpected results may occur if you write beyond the end
- * of the screen, or if (in graphics mode) you write beyond
- * the current text row. This function will not scroll the
- * screen.
- *
- * SCATTRIB is preferable for graphics modes because it
- * allows control of the characters' color. SCWRITE uses
- * color 1 in graphics modes.
- *
- * Version 6.00 (C)Copyright Blaise Computing Inc. 1983,1987,1989
- *
- **/
-
- #include <dos.h>
-
- #include <bscreens.h>
-
- int scwrite(ch,cnt)
- char ch;
- unsigned cnt;
- {
- union REGS inregs,outregs;
-
- if (cnt) /* BIOS treats 0 as 64K. */
- {
- inregs.h.ah = 10;
- inregs.h.al = ch;
- inregs.h.bh = (unsigned char) b_curpage;
- inregs.h.bl = 1; /* Use color 1 in case this is */
- /* graphics mode */
- inregs.x.cx = cnt;
- int86(16,&inregs,&outregs);
- }
-
- return(0);
- }