INMC 80 News

  

September 1980 – January 1981 · Issue 2

Page 19 of 59

Is Pascal Necessary ?

I put that sub-heading in to stir up some correspondence in defence of the people who write long series of articles in the glossier magazines about structured programming. Their second article tends to be full of rules you must not break, or your programs will not be structured, and you won’t be a “real/​rdquo; programmer. In fairness, it must be said that the first article in such a series is usually full of excellent advice such as design your program before you start to write it, make it modular and test each routine as you write it. This is good; and in my usual “do as I say, not as I do” style I recommend it. The rules that appear in the second article are odd though. Why must we never use GOTO ? Why is a “computed GOTO” doubly damned ? Will the sky really fall down if I continue to write self-modifying code using undocumented opcodes ? I think (and remember, I’m not getting paid for this !) that you get paid more for two articles than you do for one.

My greatest software achievement so far would have had to be about 6K in length if I had obeyed all those rules. It is in fact 1.5K, modifies itself when necessary, uses IX and IY as four 8-bit registers, and won’t work if relocated carelessly; you have probably seen it advertised.

Soft­ware In Progress.

Now that I have all this time, and can’t sit zapping Klingons all night, I have several projects under way. One of the least useful is an extension to Nas-Sys, in the form of a Genuine People Personality. This should not be too tricky, all you have to do is put a new routine address table together, change the table address in the workspace RAM and add suitable messages before (after ?, during ?) the normal routines. To prevent this from becoming boring, they shouldn’t always appear, and should vary. The counter-timer chip on the I/O board should come in handy here. It could also be used to produce a message if there is no input for, say, five minutes. “I’m not making you depressed, am I?” would be probable. I hope to make Marvin very much more like his Radio 4 namesake....

I have also restarted work on an improved Pilot interpreter, for use with Nas-Sys, but this is at present halted. I’m waiting for my copy of the Scelbi Z80 Software Gourmet Guide and Cookbook, so that I can adapt (pronounced “pinch”) the floating point routines it includes. A friend showed me this book, and I recommend it for any Nascom user who needs a good introduction to programming in machine code. My original interpreter only had positive integer arithmetic; in case you think that would suffice, you will be glad to hear that I recently lent a copy of it to a friend in the hope that the thing would get properly written out and sent in for the library. The new version will also have a G: command for graphics, and some fancy screen formatting, if I can get it to work.

I liked the article in Practical Computing, August issue, about a program to play “Adventure”. I have been giving some thought to how I would go about this. The printed version is a program in “pseudo-code” which uses several tables of information to play the game. To change the game you change the tables. My own, very slightly different, approach would be to define a new language, with statements of various types for the elements of the adventure: these would include place statements, artifact statements and so on. Then all (ha ha) that is needed is an interpreter for the language. Then I looked at how much data would need to be stored, and came to the conclusion that the thing would need disks to be worthwhile. The coward’s way out, and if one of you proves me wrong, I’ll be delighted. (Official receiver, please note that I am waiting for the chance to buy myself a disk controller board, not to mention the programmable graphics unit.)

Things Someone Should Build.

These are both light-years beyond my design ability, but I will write the software for them in exchange for one of each, should some genius manage to design them. Sorry, Heloise, but I offered first.

Page 19 of 59