Mail Archives: djgpp/1997/06/15/04:56:40
On Thu, 12 Jun 1997, Steve Higgins wrote:
> My bodge work around is to call the this function at the start of main().
>
> void startup_uclock()
> {
> unsigned long tics;
>
> tics = _farpeekl(_dos_ds,0x46c);
>
> /* wait for a BIOS tick */
> while(tics == _farpeekl(_dos_ds,0x46c));
> /* initialise uclock() */
> uclock();
> }
I don't understand. Here's a fragment from `uclock' sources:
/* Make sure the numbers we get are consistent */
do {
otics = _farpeekl(_dos_ds, 0x46c);
outportb(0x43, 0x00);
lsb = inportb(0x40);
msb = inportb(0x40);
tics = _farpeekl(_dos_ds, 0x46c);
} while (otics != tics);
It appears that `uclock' *does* in fact attempt to make both parts of
the value consistent. Can you explain what is it that your loop does
better than this one? Thanks.
- Raw text -