80-Bus News


November–December 1984 · Volume 3 · Issue 6

Page 27 of 55

A ‘C’ Programmer Exposes Himself

By Dave Russ

Never once flinching from that hard cruel stare, the lovely mantissa threw off her flimsy wrap and pressed her heaving bosom into the dark matting that was his chest… What was that Paul?… 80-BUS still 4 months behind… article on ‘C’?… But I was just!!… Oh alright then.

Well since my debut article on GSX I have been harbouring the thought that my as yet untapped talent for generating copious blurb could be put to better use in writing popular smut, however the frontiers of science will never be pushed much further if I adopt that attitude so I had better move on to more serious matters.

Have you ever heard the conversation that went like, “‘C’, yes I’ve had a look at it but could never get the hang of it somehow, I just stick to BASIC and assembler now”. I used to hear this quite often, and indeed have had to suffer the guffaws of non ‘C’ afficianados when confronted with a seemingly incomprehensible source listing. It did worry me at one time, and I was considering having a complex about the fact that I actually liked using ‘C’. Now, however, my confidence is restored as I have heard a buzz that the mighty Digital Research is writing BIOS material in ‘C’, and it is whispered in the hushed cloisters of Gemini Microcomputers that your own favourite agony aunt David Parkinson uses it. So, in such esteemed company, I will finally come out of the closet and expose myself in public once and for all.

Really folks once you get used to the language it seems like all your prayers have been answered; in essence ‘C’ is a high level assembler which also allows you to structure your programs according to the high ideals of the computer academics. It was originally derived from BCPL I’m told but never having seen that I don’t know, however, I suppose that the best comparison I can make is to Pascal, but with a lot less typing involved. Concerning the pedigree of this language I should say that ‘C’ and UNIX go hand in hand, more so in the past as a large proportion of the UNIX operating system is written in ‘C’ with only the nitty gritty way down there in the UNIX kernel being directly coded in assembler. Considering present company though I will drop the subject of UNIX as several ‘C’ compilers are available for the CP/M enthusiast.

I have in the past programmed in BASIC, COBOL and Fortran and I must say that in terms of program structure and flexibility ‘C’ beats these hands down for the type of applications that I have been concerned with. Of course there is no getting round the fact that for certain parts of programs assembler code is just going to have to be used for speed, but this is no problem as ‘C’ will allow you to either directly include assembler mnemonics in a source listing or link in external modules using L80 or the suchlike, depending on your compiler. This allows you to create the controlling software without a dollar terminated string or BDOS call in sight and when necessary call the assembler section to do its stuff and even pass parameters to it if required.

Now let me say at this stage that I bypassed Pascal for ‘C’ and thus I’m not very familiar with it at all, so all you Pascal freaks can sit down now and stop shouting ‘But I can do that’, I would never deride Pascal as I would be using it myself now had I not taken to ‘C’.

Page 27 of 55