Re: [Freedos-kernel] Re: [Freedos-cvs] kernel/kernel config.c,1.86,1.87

2004-05-24 Thread Bart Oldeman
Hi Tom, > > Menu timeout set at 10 seconds. Boot kernel with menu at 23:59:55. > > Timer expires at 00:00:00 (0-1.5M = very large number) > and that's exactly the wanted behaviour. is it? At least the comment doesn't say so, maybe it was in your head though. > > > instead of 00:00:05. > > and t

Re: [Freedos-kernel] Re: [Freedos-cvs] kernel/kernel config.c,1.86,1.87

2004-05-24 Thread tom ehlert
Hello Bart, >> if (GetBiosTime() - startTime > (unsigned)timeout * 18) >>break; > Menu timeout set at 10 seconds. Boot kernel with menu at 23:59:55. > Timer expires at 00:00:00 (0-1.5M = very large number) and that's exactly the wanted behaviour. > instead of 00:00:05. but it times

Re: [Freedos-kernel] patch: portab.h, exeflat.c

2004-05-24 Thread Arkady V.Belousov
Hi! 24-Май-2004 22:15 [EMAIL PROTECTED] (tom ehlert) wrote to "Arkady V.Belousov" <[EMAIL PROTECTED]>: >> In above case at first glance I don't see possibilities to break >> integrity ([] have top most priority over other operations), but this not >> mean, that such case can't be constructed

Re: [Freedos-kernel] Re: [Freedos-cvs] kernel/kernel config.c,1.86,1.87

2004-05-24 Thread Bart Oldeman
Hello Tom, > >> +if ((unsigned)(GetBiosTime() - startTime) >= timeout * 18u) > >> + return 0x; > >>} > >> + while (r.flags & FLG_ZERO); > > > This is not good way to calculate delays - around midnight (when system > > timer will be reset) above expression will be calculated

Re: [Freedos-kernel] Re: [Freedos-cvs] kernel/kernel config.c,1.86,1.87

2004-05-24 Thread Arkady V.Belousov
Hi! 24-Май-2004 22:14 [EMAIL PROTECTED] (tom ehlert) wrote to "Arkady V.Belousov" <[EMAIL PROTECTED]>: te> the original code reads: te> if (GetBiosTime() - startTime > (unsigned)timeout * 18) te>break; te> and now I want to get an example when this breaks. For example, set timeo

Re: [Freedos-kernel] Re: [Freedos-cvs] kernel/kernel config.c,1.86,1.87

2004-05-24 Thread tom ehlert
Hello Arkady, > Hi! >> +if ((unsigned)(GetBiosTime() - startTime) >= timeout * 18u) >> + return 0x; >>} >> + while (r.flags & FLG_ZERO); > This is not good way to calculate delays - around midnight (when system > timer will be reset) above expression will be calculated wro

Re: [Freedos-kernel] patch: portab.h, exeflat.c

2004-05-24 Thread tom ehlert
Hello Arkady, > In above case at first glance I don't see possibilities to break > integrity ([] have top most priority over other operations), but this not > mean, that such case can't be constructed by some smart man, which knows > language even better. another 10 points to get plonked.

[Freedos-kernel] Re: [Freedos-cvs] kernel/kernel config.c,1.86,1.87

2004-05-24 Thread Arkady V.Belousov
Hi! 24-Май-2004 18:39 [EMAIL PROTECTED] (Bart Oldeman) wrote to [EMAIL PROTECTED]: > +++ config.c 24 May 2004 18:39:49 - 1.87 > UWORD GetBiosKey(int timeout) > @@ -752,26 +749,19 @@ > + if (timeout >= 0) do >{ > r.a.x = 0x0100; /* are there keys available ? */ >

Re: [Freedos-kernel] patch: portab.h, exeflat.c

2004-05-24 Thread Arkady V.Belousov
Hi! 24-Май-2004 20:16 [EMAIL PROTECTED] (tom ehlert) wrote to "Arkady V.Belousov" <[EMAIL PROTECTED]>: >>-#define LENGTH(x) (sizeof(x)/sizeof(x[0])) >>+#define LENGTH(x) (sizeof (x)/sizeof *(x)) te> (sizeof(x)/sizeof(x[0])) has worked for me for ~20 years now. te> could you please explain why thi

Re: [Freedos-kernel] patch: portab.h, exeflat.c

2004-05-24 Thread tom ehlert
Hello Arkady, >-#define LENGTH(x) (sizeof(x)/sizeof(x[0])) >+#define LENGTH(x) (sizeof (x)/sizeof *(x)) (sizeof(x)/sizeof(x[0])) has worked for me for ~20 years now. could you please explain why this should be fixed (other then your fun to change everything) tom --

Re: [Freedos-kernel] patch: portab.h, exeflat.c

2004-05-24 Thread Arkady V.Belousov
Hi! 24-Май-2004 21:34 Arkady V.Belousov wrote to [EMAIL PROTECTED]: AVB> +++ new/hdr/portab.h 2004-05-24 21:31:58.0 + AVB> #ifdef I86 /* commandline overflow - removing /DPROTO AVB> TE */ AVB> #define PROTO AVB> #endif BTW, I think, _all_ _remained_

[Freedos-kernel] patch: portab.h, exeflat.c

2004-05-24 Thread Arkady V.Belousov
Hi! - fixed macros in portab.h: added extra parentesis around parameters; - removed duplicated macro in exeflat.c. --- Begin Message --- diff -ruNp old/hdr/portab.h new/hdr/portab.h --- old/hdr/portab.h2004-05-09 17:24:02.0 + +++ new/hdr/portab.h2004-05-24 21:31:58.0 +

Re: [Freedos-kernel] patch: intr.asm

2004-05-24 Thread Arkady V.Belousov
Hi! 24-Май-2004 17:33 Arkady V.Belousov wrote to [EMAIL PROTECTED]: AVB> - prototypes/comments cleanup. To be precise: fixed wrong protypes, syncronized with *.h files. AVB> diff -ruNp old/kernel/intr.asm new/kernel/intr.asm --- This

Re: [Freedos-kernel] bug: inithma.c

2004-05-24 Thread Arkady V.Belousov
Hi! 24-Май-2004 17:18 Arkady V.Belousov wrote to [EMAIL PROTECTED]: AVB> Should be: "if (checkHMA())". To make code more clear (understandable), AVB> better to name this function as "checkHMApresent()". Or, simpler, "HMApresent()". ---

[Freedos-kernel] patch: intr.asm

2004-05-24 Thread Arkady V.Belousov
Hi! - code cleanup/optimization, comments added. --- Begin Message --- diff -ruNp old/kernel/intr.asm new/kernel/intr.asm --- old/kernel/intr.asm 2004-05-24 17:29:46.0 + +++ new/kernel/intr.asm 2004-05-24 17:39:06.0 + @@ -108,9 +108,8 @@ RES_DOSEXEC: push ds

[Freedos-kernel] patch: intr.asm

2004-05-24 Thread Arkady V.Belousov
Hi! - prototypes/comments cleanup. --- Begin Message --- diff -ruNp old/kernel/intr.asm new/kernel/intr.asm --- old/kernel/intr.asm 2004-05-23 13:02:00.0 + +++ new/kernel/intr.asm 2004-05-24 17:29:46.0 + @@ -94,7 +94,9 @@ segmentHMA_TEXT -;; COUNT ASMPASCAL res

[Freedos-kernel] bug: inithma.c

2004-05-24 Thread Arkady V.Belousov
Hi! Was: __O\_/_\_/O__ int EnableHMA(VOID) [...] _DisableA20(); #ifdef DEBUG if (fmemcmp(MK_FP(0x, 0x), MK_FP(0x, 0x0010), 128) != 0) _ O

[Freedos-kernel] bug?

2004-05-24 Thread Arkady V.Belousov
Hi! Bart, what about removing AX=0 in INT21/5E02+? --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE

Re: [Freedos-kernel] Re: [Freedos-cvs] kernel/kernel dosfns.c,1.68,1.69 fatdir.c,1.46,1.47 fcbfns.c,1.42,1.43 ioctl.c,1.27,1.28

2004-05-24 Thread Arkady V.Belousov
Hi! 24-Май-2004 09:34 [EMAIL PROTECTED] (tom ehlert) wrote to "Arkady V.Belousov" <[EMAIL PROTECTED]>: >> Ops, mistype. Should be: te> I HATE 'oops, mistype' style bugs introduced for no purpose into a te> working kernel. NiP (Nobody is Perfect). Bart also sometime introduces silly bug

Re: [Freedos-kernel] Re: [Freedos-cvs] kernel/kernel dosfns.c,1.68,1.69 fatdir.c,1.46,1.47 fcbfns.c,1.42,1.43 ioctl.c,1.27,1.28

2004-05-24 Thread tom ehlert
Hello Arkady, > Ops, mistype. Should be: I HATE 'oops, mistype' style bugs introduced for no purpose into a working kernel. >if ((UBYTE)((0x20 + name[0]) & ~0x20) == DELETED) > Just slightly more arithmetics. For some begginers harder to read ?: Probably easy to read for some rus