Mail Archives: djgpp/2000/04/06/04:39:25
"pwillard" <pwillard AT mindspring DOT com> wrote:
>
>Actually, I'm not too afraid of straight C code, but accessing BIOS
>information as in the FAQ
>made me very cautious. I'm not sure how to access the rom bios area to
>perform what the old pascal
>code was doing.
>
>Here is the snippet of Pascal:
>
>TICK := LONGINT(PTR($40, $6C)^); {GET ROM BIOS TIMER TICK COUNT}
>
> Should I be more creative when accessing the system as done in the example?
>I mean, what's the magic?
>
>I know that the 8253/8254 uses a 4 byte area located at 0040:006C
>(segment:offset notation) for
>incrementing a counter and that's exactly what the code above does.
>
>I want to snap shot the counter, and compare it's value to a snap shot later
>for speed calibration. I
>just don't understand yet how to tell DJGPP to do this without whacking the
>system into oblivion.
>
>Pete
>(Who's afraid to touch memory directly after reading the FAQ. )
It's not that bad. Of course it's different with a 16 bit compiler, pascal, c
or whatever. I suggest you read the far pointer intro at
http://www.delorie.com/djgpp/doc/ug/dpmi/farptr-intro.html
--
Manni
- Raw text -