delorie.com/archives/browse.cgi | search |
From: | "pwillard" <pwillard AT mindspring DOT com> |
Newsgroups: | comp.os.msdos.djgpp |
References: | <8cg55n$1kl$1 AT mailint03 DOT im DOT hou DOT compaq DOT com> <200004061524 DOT UAA01453 AT midpec DOT com> |
Subject: | Re: How to get bios timer tick count? |
Lines: | 39 |
X-Priority: | 3 |
X-MSMail-Priority: | Normal |
X-Newsreader: | Microsoft Outlook Express 5.00.2615.200 |
X-MimeOLE: | Produced By Microsoft MimeOLE V5.00.2615.200 |
Message-ID: | <sB7H4.2784$x62.8311@typhoon.southeast.rr.com> |
Date: | Thu, 06 Apr 2000 21:47:04 GMT |
NNTP-Posting-Host: | 24.31.125.207 |
X-Complaints-To: | abuse AT mediaone DOT net |
X-Trace: | typhoon.southeast.rr.com 955057624 24.31.125.207 (Thu, 06 Apr 2000 17:47:04 EDT) |
NNTP-Posting-Date: | Thu, 06 Apr 2000 17:47:04 EDT |
Organization: | MediaOne - Atlanta |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
Wow, my attempt was close to some of the other examples, but Andy Ruder came up with the right results for me, thanks! And it makes more sense now. Sheesh! From Andy: #include <sys\farptr.h> #include <go32.h> int main (void) { long int x; // Ok, the formula for accessing DOS memory using the_go32_conventional_mem_selector() // command is segment * 16 + offset, so we need to access 0x40 * 0x10 +0x6c // This assumes the first argument in PTR in pascal is segment and thelatter offset. x = _farpeekl(_go32_conventional_mem_selector(), 0x40 * 0x10 + 0x6C); printf("The BIOS tick count is %d.", x); } Thanks All. Prashant TR <tr AT midpec DOT com> wrote in message news:200004061524 DOT UAA01453 AT midpec DOT com... > > I'm converting some old pascal code for DJGPP and I have run into a snag. > > I'm not sure how to tell DJGPP to get the bios timer tick count value... > > anybody know? > > unsigned long x = _farpeekl(_dos_ds, 0x46c);
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |