Author: Steven Edwards
Date: 14:26:53 09/10/03
Go up one level in this thread
On September 10, 2003 at 15:44:23, Dieter Buerssner wrote: >On September 10, 2003 at 12:38:17, Steven Edwards wrote: >It will make the program less portable. For example, I have a DOS version of my >engine. I don't know of any POSIX thread library for this. A polling program can >be very portable. Of course, one needs a few lines of system specific code (at >least in C), to see whether input is available. But that is just about all. All >the core stuff of the engine will need no changes. I also calculate the nodes >between time checks dynamically. In profile runs, it doesn't show up anywhere >near the top - so basically no time is lost. I am reminded of my first C language chess program I wrote back in the early 1980s that ran under MS-DOS 2.1 (or something like that, it was a while ago). I wanted to use a timer like that provided by the alarm()/signal() services of early Unix, but MS-DOS didn't support that. But, the underlying BIOS did support timed tasks (I think this was somewhat portable), so I used that to periodically update a timer variable inside my program. This worked, but since the BIOS was doing this without MS-DOS knowing, I had to be careful to cancel the BIOS timer from my program before my program exited. Otherwise, the BIOS would keep writing to that absolute, yet unpredictable location in memory as long as the system was powered up. You can easily imagine the bugs that could result.
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.