Added comments. Think I've fixed INT 10/08 (Get Character and

Attribute at Cursor).
This commit is contained in:
Joseph Pranevich 1999-02-14 11:19:07 +00:00 committed by Alexandre Julliard
parent 11076b1b89
commit 9896a36168
1 changed files with 24 additions and 9 deletions

View File

@ -18,8 +18,6 @@ static void scroll_window(int direction, char lines, char row1,
static int color_pallet[16];
static char dummy; /* dummy var used for unneeded CONSOLE function parameter */
#define SCROLL_UP 1
#define SCROLL_DOWN 2
@ -68,6 +66,10 @@ void WINAPI INT_Int10Handler( CONTEXT *context )
0111b light gray 1111b white
*/
/* These AllocColor calls have the side-effect of triggering
ternimal initialization as xx_Init() is no longer called on
startup. Which is what we want anyway. */
color_pallet[0] = CONSOLE_AllocColor(WINE_BLACK);
color_pallet[1] = CONSOLE_AllocColor(WINE_BLUE);
color_pallet[2] = CONSOLE_AllocColor(WINE_GREEN);
@ -191,11 +193,24 @@ void WINAPI INT_Int10Handler( CONTEXT *context )
case 0x08: /* READ CHARACTER AND ATTRIBUTE AT CURSOR POSITION */
{
CHAR ch, attr;
TRACE(int10, "Read Character and Attribute at Cursor Position\n");
CONSOLE_GetCharacterAtCursor(&ch, &dummy, &dummy, &attr);
AL_reg(context) = ch;
AH_reg(context) = attr;
/* Note here that color data returned is bogus, will fix later. */
char ch;
int bg, fg, attr;
if (BH_reg(context)) /* Write to different page */
{
FIXME(int10, "Read Character and Attribute at Cursor Position -"
" Can't read from non-0 page\n");
AL_reg(context) = ' '; /* That page is blank */
AH_reg(context) = 7;
}
else
{
TRACE(int10,
"Read Character and Attribute at Cursor Position\n");
CONSOLE_GetCharacterAtCursor(&ch, &fg, &bg, &attr);
AL_reg(context) = ch;
AH_reg(context) = 7; /* FIXME: We're assuming wh on bl */
}
}
break;
@ -204,7 +219,7 @@ void WINAPI INT_Int10Handler( CONTEXT *context )
/* BH = Page Number */ /* We can't write to non-0 pages, yet. */
/* BL = Attribute / Color */
/* CX = Times to Write Char */
/* !NOTE!: It appears as if the cursor is not advanced if CX > 1 */
/* Note here that the cursor is not advanced. */
write_char_attribute_at_cursor(AL_reg(context), BH_reg(context),
BL_reg(context), CX_reg(context));
if (CX_reg(context) > 1)