Scor­pio News


October–December 1988 – Volume 2. Issue 4.

Page 17 of 35

Leaving The Program

Since a C program is run by effectively calling the main() function: any exit from this function will cause a return to system. This will occur when the code for main() runs out, or if a return statement occurs in main(). There is also usually a function supplied called exit(). This takes one argument which is usually O a normal exit or non-zero for an error exit.


I have obviously not had space to attempt to teach anyone to use C in this article and that was never my intention. For those of you who have not yet tried out C, I hope this little taster has whet your appetite. There are a good number of C compilers around at a range of prices, Probably the cheapest is HiSoft C++ (a misleading title as C++ is a slightly different language. HiSoft is standard-C). HiSoft does not support floating point and it compiles directly to a .COM file without using a linker (which I find a disadvantage although some people prefer it), but it comes with a good editor and is a good version to start on as it is pretty much correct and standard. There are also a number of good books on the subject, but look for recommendations as there are some bad ones too. The ultimate definitive book is “The C Programming Language” by Kernighan and Ritchie, but this is probably a bit heavy for beginners.

Picking up the PCs

by P.D.Coker

A couple of years ago, I was reading one of the more erudite electronic magazines (Elektor) and came across a series of articles on the construction of a PC compatible – this was sometime before Mr Sugar let loose his PC 1512s on the scene. I found that a motherboard (PCB) was available for about £75, and a scrounge around produced most of the chips needed to populate it. I was even able to get hold of a PC keyboard and other requisite hardware at a very good price – the whole lot cost rather less than £250. Naturally, there were conflicts in the constructional and setting up details and even Elektor got one or two things wrong. Sadly, the machine didn’t work and it was consigned to the “pending” area of my workshop until I had the time to do something about it! I carried on computing with CR/M Plus and the trusty Map-80 system.

Then, the Amstrad PCs started the rot. After some piggy-bank rattling, my wife and I decided to buy one of these, add 128k of memory and upgrade it with a V30 and

Page 17 of 35