Skip to content

Commit

Permalink
add menu_cfg variable(0x8308)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenall committed Aug 12, 2014
1 parent 73df31e commit a0cc34d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions stage2/asm.S
Expand Up @@ -161,7 +161,7 @@ codestart:
/* internal variables follow */
. = EXT_C(main) + 0x74
VARIABLE(menu_num_ctrl)
.long 0x10002000
.long 0x2000
#include "grub4dos_int_ver.h"
#ifdef GRUB4DOS_INT_VER
.long GRUB4DOS_INT_VER
Expand Down Expand Up @@ -279,7 +279,8 @@ VARIABLE(addr_system_functions)

VARIABLE(addr_system_variables)
.long ABS(EXT_C(system_variables))

VARIABLE(menu_cfg)
.byte 0x10
. = EXT_C(main) + 0x110

VARIABLE(addr_saved_dir)
Expand Down
3 changes: 2 additions & 1 deletion stage2/stage2.c
Expand Up @@ -224,6 +224,7 @@ myatoi (void)


/* Print an entry in a line of the menu box. */
extern char menu_cfg[];
extern unsigned char menu_num_ctrl[];
static void
print_entry (int y, int highlight,int entryno, char *config_entries)
Expand All @@ -237,7 +238,7 @@ print_entry (int y, int highlight,int entryno, char *config_entries)
is_highlight = highlight;

gotoxy (MENU_BOX_X - 1, y);
grub_putchar(highlight ? (menu_num_ctrl[2] = entryno,menu_num_ctrl[3]) : ' ', 255);
grub_putchar(highlight ? (menu_num_ctrl[2] = entryno,menu_cfg[0]) : ' ', 255);
if (entry)
{
if (config_entries == (char*)titles)
Expand Down

0 comments on commit a0cc34d

Please sign in to comment.