From c4e02e86548fbbc9ab97de48d3cb04f7c87f4697 Mon Sep 17 00:00:00 2001 From: Bart Oldeman Date: Fri, 19 Sep 2003 02:13:35 +0000 Subject: [PATCH] Correct floppy booting; increase "menu space tolerance" from 3 to 10. git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@701 6ac86273-5f31-0410-b378-82cca8765d1b --- kernel/config.c | 9 +++++---- kernel/kernel.asm | 10 +--------- kernel/main.c | 25 +++++++++++++------------ 3 files changed, 19 insertions(+), 25 deletions(-) diff --git a/kernel/config.c b/kernel/config.c index 51cb1f2..02e9b05 100644 --- a/kernel/config.c +++ b/kernel/config.c @@ -315,12 +315,12 @@ STATIC struct table commands[] = { int findend(BYTE * s) { int nLen = 0; - /* 'marks' end if at least three spaces, 0, or newline is found. */ + /* 'marks' end if at least ten spaces, 0, or newline is found. */ while (*s && (*s != 0x0d || *s != 0x0a) ) { BYTE *p= skipwh(s); - /* ah, more than two whitespaces ? We're done here (hrmph!) */ - if((unsigned int)p - (unsigned int)s>=3) + /* ah, more than 9 whitespaces ? We're done here (hrmph!) */ + if(p - s >= 10) break; nLen++; ++s; @@ -1124,6 +1124,7 @@ STATIC VOID CfgSwitches(BYTE * pLine) pLine++; /* skip optional separator */ if (!isnum(*pLine)) { + pLine--; Config.ebda2move = 0; break; } @@ -1983,7 +1984,7 @@ RestartInput: } else if(key == 0x5000 && MenuColor != -1) /* arrow down */ { - if(MenuSelected<10 && (Menus & (1 << (MenuSelected+1))) ) + if(MenuSelected= 0x80) - drv = 3; /* C: */ - LoL->BootDrive = drv; - - *(DWORD FAR *)MK_FP(0,0x5e0+2) = 0; - } + *(DWORD FAR *)MK_FP(0,0x5e0+2) = 0; + } else { + drv = LoL->BootDrive + 1; + *(UBYTE FAR *)MK_FP(0,0x5e0) = drv - 1; fmemcpy(&InitKernelConfig, &LowKernelConfig, sizeof(InitKernelConfig)); } - + + if (drv >= 0x80) + drv = 3; /* C: */ + LoL->BootDrive = drv; + setvec(0, int0_handler); /* zero divide */ setvec(1, empty_handler); /* single step */ setvec(3, empty_handler); /* debug breakpoint */