home *** CD-ROM | disk | FTP | other *** search
- /*=======================================================*/
- /* TVSHADOW.C */
- /* functions dealing with shadow buffer */
- /* */
- /* (c) Copyright 1988 Ralf Brown All Rights Reserved */
- /* May be freely copied for noncommercial use, so long */
- /* as this copyright notice remains intact, and any */
- /* changes are marked in the comment blocks preceding */
- /* functions. */
- /*=======================================================*/
-
- #include "tvapi.h"
-
- /*======================================================*/
- /* TVshadow get address of shadow buffer */
- /* Ralf Brown 4/3/88 */
- /*======================================================*/
-
- void far *TVshadow(void)
- {
- unsigned screen_seg ;
-
- _AH = 15 ; /* get video mode */
- geninterrupt(0x10) ;
- if (_AL == 7)
- screen_seg = 0xB000 ;
- else
- screen_seg = 0xB800 ;
- _ES = screen_seg ;
- _DI = 0 ;
- _AH = 0xFE ;
- geninterrupt(0x10) ;
- return MK_FP(_ES,_DI) ;
- }
-
- /*======================================================*/
- /* TVupdate update portion of physical window */
- /* Ralf Brown 4/3/88 */
- /*======================================================*/
-
- void TVupdate(void far *first, WORD count)
- {
- if (count)
- {
- _ES = FP_SEG(first) ;
- _DI = FP_OFF(first) ;
- _CX = count ;
- _AH = 0xFF ;
- geninterrupt(0x10) ;
- }
- }
-
-