home *** CD-ROM | disk | FTP | other *** search
- /**
- *
- * Name scapage -- Display (activate) a video page
- *
- * Synopsis apage = scapage(page);
- *
- * int apage The video page actually displayed.
- * int page The page to display (activate).
- *
- * Description SCAPAGE sets the active display page, i.e., displays the
- * page. The cursor is not changed in form.
- *
- * Use SCMODE to find how many pages are supported by the
- * current device in the current mode. Use SCPAGE to
- * direct Blaise C TOOLS screen output to a given page,
- * whether it is active (displayed) or not.
- *
- * Returns apage The video page actually displayed.
- *
- * Version 6.00 (C)Copyright Blaise Computing Inc. 1983,1987,1989
- *
- **/
-
- #include <dos.h>
-
- #include <bscreens.h>
-
- int scapage(page)
- int page;
- {
- int max_page;
- union REGS inregs,outregs;
-
- max_page = scpages() - 1; /* Maximum page value */
-
- utbound(page,0,max_page)
-
- if (max_page) /* Switch active page only if */
- { /* this device supports more */
- inregs.h.ah = 5; /* than one. */
- inregs.h.al = (unsigned char) page;
- int86(16,&inregs,&outregs);
- }
-
- return(page);
- }