INMC News

  

Autumn 1979, Issue 4











Page 11 of 30











humble π does it again

I recently assembled the Sargon chess program to run on my Nascom. The response time of this program was rather long so I tried running the system at 4Mhz and found that it worked well at this clock rate. Tiny Basic would not run, because the EPROMs are not fast enough, but all the other programs that I tried worked perfectly, with the single exception of ZEAP which produced garbled lines when assembling long programs at 4 Mhz. I fitted a switch in place of the clock select link on the buffer board so that I could operate the system at either speed, and as a result made an amazing discovery – a program that would run at 4 Mhz but not at 2 Mhz.

The program was suggested by the June issue of Creative Computing which published the value of pi to 8192 decimal places; no details were given of the method used, but I decided to try and write a program for Nascom to give at least as many places. I assembled the program with ZEAP and it appeared to work well, but I soon found that from the 160th decimal place the figures were wrong. I spent a long time over the next day or two looking for a software bug, with no success, and I was becoming obsessed by the problem when it suddenly started to give the correct answer. This was even worse, because I had not changed anything. It was quite a while before I realised that the clock rate was switched to 4 Mhz; returning to the standard rate caused the fault to reappear.

Further experiments showed that the result was only wrong when the program was in static RAM on the CPU board; in dynamic RAM it ran perfectly at either clock rate. I had just decided that there was some unexplained fault on the CPU board when I received issue 3 of INMC News, which suggested that noise could cause problems on early boards. “Bussing up” the ground and 5V rails improved the operation of the pi program – it now got the answer right up to the 450th place. As noise was apparently the cause of the problem I finally tried “bussing” the memory boards. I had not carried out this simple modification before because as far as I knew my system was free of “memory plague”. This cleared up the problem entirely and as a bonus it has reduced the sensitivity of the system to external (mains) noise and improved the operation of ZEAP at 4 Mhz! Perhaps it would be worthwile modifying memory boards even if they don’t suffer from the plague.

Presumably if I hadn’t tried to run the system at 4 Mhz I would still be looking for the software bug!

J Haigh
Huddersfield


This is an OCR’d version of the scanned page and likely contains recognition errors.











Page 11 of 30