File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ static char con_is_device;
5656static char con_is_monochrome ;
5757static char cursor_sync_disabled ;
5858
59+ static unsigned char vid_page ;
5960static unsigned short __far * vid_mem ;
6061
6162static void con_get_hw_cursor ( int * x , int * y );
@@ -84,6 +85,7 @@ void con_init( int interpret_esc )
8485 r .h .ah = 0xf ;
8586 intr ( 0x10 , & r );
8687 con_is_monochrome = ( r .h .al == 7 );
88+ vid_page = r .h .bh ;
8789 vid_mem = ( con_is_monochrome ) ? MK_FP ( 0xb000 , 0 ) : MK_FP ( 0xb800 , 0 );
8890
8991 /* screen size ? */
@@ -199,8 +201,9 @@ static void con_get_hw_cursor( int *x, int *y )
199201{
200202 union REGPACK r ;
201203
202- r .x .ax = 0x0300 ;
203- r .x .bx = 0 ;
204+ memset ( & r , 0 , sizeof ( union REGPACK ) );
205+ r .h .ah = 0x03 ;
206+ r .h .bh = vid_page ;
204207 intr ( 0x10 , & r );
205208
206209 * x = r .h .dl + 1 ;
@@ -216,8 +219,8 @@ static void con_set_hw_cursor( int x, int y )
216219 }
217220
218221 memset ( & r , 0 , sizeof ( union REGPACK ) );
219- r .w . ax = 0x0200 ;
220- r .w . bx = 0 ;
222+ r .h . ah = 0x02 ;
223+ r .h . bh = vid_page ;
221224 r .h .dl = x - 1 ;
222225 r .h .dh = y - 1 ;
223226 intr ( 0x10 , & r );
You can’t perform that action at this time.
0 commit comments