Author: Christophe Theron
Date: 20:11:38 10/07/99
Go up one level in this thread
On October 07, 1999 at 23:04:28, Ratko V Tomic wrote:
> > That might not be exactly what a chess program wants. IE most of us
> > read in a whole move (line including 0x0a) at one time. The above
> > would mean you have to read in char by char, handle backspaces, and
> > so forth, inside the program, and be sure to wait until the 0x0a is
> > read signifying the <return> key way hit.
>
>The macro anykey() is meant to check if there are keys in the buffer. Only
>if true one can call and do whatever the program was doing earlier with
>the kbd input, i.e. if macro evaluates false, there is no need to do
>more expensive checks. It is less expensive than decrementing a counter
>and branching on nonzero (to skip the excessive checks), while it actually
>performs the check of actual keys present and gives instant responsevness
>if there is one or more keys waiting.
>
>> Best solution is to dump dos. :)
>
>From my tests with DOS chess programs, you lose at least 5% in CPU time
>and many megabytes of RAM if you run the program under Windows (more under
>NT than 95/98). Since 32-bit code can be done in either, if I were
>competing with a chess program, I would keep a raw engine with a text
>output to run on a bare machine (i.e. under plain DOS) to be used for
>competitions and benchmarks. For user convenience, a Windows UI would
>be able to run the same engine, with lower hash and lower CPU share.
>
>> it is unsafe anyway, since there is no memory protection and
>> those TSR's are not always well-behaved...
>
>I know, I made living for few years selling my TSR library & tools
>(CodeRunner package). It made safer TSRs (but only if user chose to
>listen to the advice).
With a friend of mine I have completely disassembled DOS some years ago.
A cute piece of software, I would say. :)
I needed that because I had written a general multitasking system for TSRs. We
had problems and discovered that a small subset of the DOS functions did not
support reentrancy. It was at the time the "DOS busy" flag was not documented!
Oops... This is completely illegal. Don't try at home! :)
Christophe
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.