FreeBASIC  0.91.0
io_pageset.c
Go to the documentation of this file.
1 /* console 'screen , pg, pg' function */
2 
3 #include "../fb.h"
4 #include "fb_private_console.h"
5 #include <dpmi.h>
6 
7 int fb_ConsolePageSet ( int active, int visible )
8 {
9  int res = __fb_con.active | (__fb_con.visible << 8);
10 
11  if( active >= 0 )
12  {
13  __fb_con.active = active;
14  }
15 
16  if( visible >= 0 )
17  {
18  if( __fb_con.visible != visible )
19  {
20  __dpmi_regs regs;
21  regs.h.ah = 0x05;
22  regs.h.al = visible;
23  __dpmi_int(0x10, &regs);
24 
25  __fb_con.visible = visible;
26  }
27  }
28 
29  return res;
30 }