<RANTMODE> I'M HIGHLY DISAPPOINTED TO FIND THAT SOME FORMERLY WORKING CODE DOESN'T WORK ANYMORE;
I'M IN PARTICULAR DISAPPOINTED AS THIS CODE WAS ONLY CHANGED TO SAVE SOME 20 BYTE OF INIT CODE. WELL - THIS SAVES 20 BYTE, BUT COSTED ME A MONTH TO DISCOVER - AND AN ADDITIONAL HOUR TO FIX. TO ALL OPTIMIZERS: HANDS OFF. GO PLAY SOMEWHERE ELSE. </RANTMODE> UWORD GetBiosKey(int timeout) { iregs r; ULONG startTime = GetBiosTime(); if (timeout >= 0) do { r.a.x = 0x0100; /* are there keys available ? */ init_call_intr(0x16, &r); - if ((unsigned)(GetBiosTime() - startTime) >= timeout * 18u) + if ((unsigned)(GetBiosTime() - startTime) > timeout * 18u) return 0xffff; } while (r.flags & FLG_ZERO); /* key available or blocking wait (timeout < 0): fetch it */ r.a.x = 0x0000; init_call_intr(0x16, &r); return r.a.x; } tom ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com _______________________________________________ Freedos-kernel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-kernel