| View previous topic :: View next topic |
| Author |
Message |
Don Dailey
Joined: 29 Apr 2008 Posts: 4312
|
Post subject: Re: Your first chess program. Posted: Sun Apr 22, 2012 2:22 pm |
|
|
| Joost Buijs wrote: |
| Rebel wrote: |
My start was also on the TRS-80 (1980) running at 1.77 Mhz and 16Kb RAM. The basic interpreter was incredible slow doing only 50 instructions per second and it took 10 minutes to finish a one ply search from the start position, that's about 0.03 NPS When I moved the thing to ASM a got a speed-up with a factor of around 4000 and could do 100-150 NPS. Another royal pain was the cassette recorder to save the sources. Although the source code was split into several parts the bigger ones could take up to 15 minutes to save and then on many occasions the verification check (which took about the same time) reported the save-file was broken. Cleaning the heads of the cassette-recorder for the xx time mostly solved the problem else throw the cassette away and insert a new one. The thing was eating cassettes for breakfast. Crazy times. |
I remember that in the beginning I was using two cassette recorders on the Heatkit H8, first I had to load the assembler with one recorder and after loading the assembler I could load the source, the object code was written to the second cassette recorder. I never used BASIC for chess programming because it was way to slow. Somewhere around 1981 Zortech C became available for CP/M and I translated the whole program to C. It was about two times slower than the ASM version but much easier to code. Nowadays the optimizers in the C/C++ compilers are incredibly efficient and it is virtually impossible to get better results with assembler. |
I knew that basic wouldn't cut it for chess, but I learned how to program from the excellent tutorial manual that came with the TSR-80. I don't know if I have ever seen such a well presented manual in my life since. When Radio Shack called me it just happened that I was starting my 4 day break from work as a crane operator at a steel mill. I picked up the machine, locked myself in my room for 4 days and came out knowing how to program!
I later purchased the assembler and learned how to program z-80 assembly.
I had written a fun "reaction test" program in basic, something would pop up on the screen and you had to react as quickly as possible by hitting a key. testing for keyboard input while counting made the resolution of this timer very low. So I coded it in machine code, in those days it was common practice to load it into a string and there was a basic keyword which would execute the code stored there I think. I still remember that after this change the resolution of the timer was about 1/60000 - in other words I could test for keyboard input 60,000 times per second! It was orders of magnitude more than in basic. I don't remember the resolution in basic but it was pathetic - something in the double digits, perhaps 15 or 20 time per second. _________________ "Your superior intellect is no match for our puny weapons." -Kang and Kodos |
|
| Back to top |
|
 |
|
| Subject |
Author |
Date/Time |
Your first chess program. |
Dan Honeycutt |
Fri Apr 20, 2012 1:07 pm |
Re: Your first chess program. |
Martin Sedlak |
Fri Apr 20, 2012 1:28 pm |
Re: Your first chess program. |
Sam Hamilton |
Fri Apr 20, 2012 2:15 pm |
Re: Your first chess program. |
Joshua Shriver |
Sun Apr 22, 2012 4:54 am |
Re: Your first chess program. |
Ted Wong |
Sun Apr 22, 2012 6:28 am |
Re: Your first chess program. |
Thomas Petzke |
Fri Apr 20, 2012 2:02 pm |
Re: Your first chess program. |
Don Dailey |
Fri Apr 20, 2012 4:07 pm |
Re: Your first chess program. |
Gerd Isenberg |
Fri Apr 20, 2012 5:31 pm |
Re: Your first chess program. |
H.G.Muller |
Fri Apr 20, 2012 6:10 pm |
Re: Your first chess program. |
Jan Brouwer |
Fri Apr 20, 2012 7:05 pm |
Re: Your first chess program. |
Mark Lefler |
Sat Apr 21, 2012 11:59 pm |
Re: Your first chess program. |
Don Dailey |
Sun Apr 22, 2012 12:11 am |
Re: Your first chess program. |
Ed Schroder |
Sun Apr 22, 2012 8:28 am |
Re: Your first chess program. |
Don Dailey |
Sun Apr 22, 2012 11:23 am |
Re: Your first chess program. |
J. B. Buijs |
Sun Apr 22, 2012 2:03 pm |
Re: Your first chess program. |
Don Dailey |
Sun Apr 22, 2012 2:22 pm |
Re: Your first chess program. |
Dan Honeycutt |
Sun Apr 22, 2012 4:18 pm |
Re: Your first chess program. |
Don Dailey |
Sun Apr 22, 2012 4:23 pm |
Re: Your first chess program. |
Dan Honeycutt |
Sun Apr 22, 2012 4:31 pm |
Re: Your first chess program. |
Ed Schroder |
Sun Apr 22, 2012 5:11 pm |
Re: Your first chess program. |
Julien MARCEL |
Sun Apr 22, 2012 7:35 pm |
Re: Your first chess program. |
Robert Hyatt |
Fri Apr 20, 2012 7:34 pm |
Re: Your first chess program. |
Julien MARCEL |
Fri Apr 20, 2012 11:33 pm |
Re: Your first chess program. |
J. B. Buijs |
Sat Apr 21, 2012 6:27 am |
Re: Your first chess program. |
Evert Glebbeek |
Sat Apr 21, 2012 6:32 am |
Re: Your first chess program. |
Jon Dart |
Sat Apr 21, 2012 7:27 pm |
Re: Your first chess program. |
Martin Brown |
Mon Apr 23, 2012 10:19 am |
Re: Your first chess program. |
Jon Dart |
Tue Apr 24, 2012 12:01 am |
Re: Your first chess program. |
Harald Lüßen |
Sat Apr 21, 2012 11:20 pm |
Re: Your first chess program. |
F. Bluemers |
Sat Apr 21, 2012 11:44 pm |
Re: Your first chess program. |
Harald Lüßen |
Sun Apr 22, 2012 8:43 am |
Re: Your first chess program. |
Matthias Hartwich |
Mon Apr 23, 2012 8:11 pm |
Re: Your first chess program. |
Thorsten Czub |
Tue Apr 24, 2012 6:50 pm |
Re: Your first chess program. |
Joshua Shriver |
Sun Apr 22, 2012 4:43 am |
Re: Your first chess program. |
Ron Murawski |
Mon Apr 23, 2012 12:16 am |
Re: Your first chess program. |
Vincent Diepeveen |
Mon Apr 23, 2012 8:38 am |
Re: Your first chess program. |
Evert Glebbeek |
Mon Apr 23, 2012 8:45 am |
Re: Your first chess program. |
Ron Murawski |
Wed Apr 25, 2012 4:45 am |
Re: Your first chess program. |
Martin Brown |
Mon Apr 23, 2012 9:36 am |
Re: Your first chess program. |
John Merlino |
Tue Apr 24, 2012 1:06 am |
Re: Your first chess program. |
Vincent Diepeveen |
Tue Apr 24, 2012 5:28 pm |
Re: Your first chess program. |
John Merlino |
Tue Apr 24, 2012 6:41 pm |
Re: Your first chess program. |
Oscar Toledo G. |
Fri May 04, 2012 5:28 pm |
Re: Your first chess program. |
Giorgio Medeot |
Thu May 10, 2012 3:50 pm |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|