/*------------------------------------------------------------------------------ TIME.C: Time Function for DHRYSTONE and WHETSTONE Benchmarks Copyright 1995-1996 Keil Software, Inc. ------------------------------------------------------------------------------*/ #include <reg51.h> long timeval; timerint () interrupt 1 { TH0 = -250; /* 125 Hz at 12 MHz 8051 */ timeval++; } long time (long *t) { long tval; t = (long *) 0; EA = 0; tval = timeval; IE = 0x82; TR0 = 1; return (tval); } initserial () { SCON = 0x52; /* SCON */ TMOD = 0x20; /* TMOD */ TCON = 0x69; /* TCON */ TH1 = 0xf3; /* TH1 */ } <div align="center"><br /><script type="text/javascript"><!-- google_ad_client = "pub-7293844627074885"; //468x60, Created at 07. 11. 25 google_ad_slot = "8619794253"; google_ad_width = 468; google_ad_height = 60; //--></script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script><br /> </div>