INMC 80 News


February–April 1981 · Issue 3

Page 32 of 55

Z80 made simple

The Kiddies Guide To Z80 Assembler Programming

D. R. Hunt

Part: The third.

Catching the Nascom Disease
(Mental Health Warning: Computers are addictive)

So far we have learned to count with the aid of eight fingers two thumbs and six assorted toes (unless you are lucky enough to have grown the necessary extra three fingers on each hand), we have looked at what goes into making up machine code instructions by making use of a spare #1,000 train set (or perhaps you tried it in real life by hiring a redundant BR marshalling yard for a weekend). We have also looked at the unpredictable results of giving the processor the wrong codes to work with, and had a look around the innards of the Z80 in general. Now its ‘crunch time’. We’re acutally going to write a program. Well not so much a program, more of a .... er .... well, stupid little thing that can only really count as a program because it actually does something, not much, but something.

This is the story of how I came to be involved with these mind bending machines, and how I wrote my first program. Bear in mind that at time I had only the sketchiest idea of what it was all about, and, although you might swear at the incomprehensibility of the documentation, it was a darned sight worse then than it is now.

First, capture your Nascom

It was, I think, in April in the year of ’78 that I was sent forth by my superiors. My quest, to capture, dead or alive, a Nascom 1 from the shrine of the Lynx, situated in the dark and mysterious nether depths of Bucks, some leagues from my abode. I drove to Chesham and parked my trusty (or, in truth, I should say rusty) chariot in the parking place thoughtfully provided for the purpose by the elders of the Council of Chesham. I walked with trepidation up Broad Street, thinking that the name was ill devised, save for the purpose of confusing the finder by its very inappropriateness. Past the forboding gloom of the funeral parlour (I looked for black ravens or other evil birds, but there were none) and for the first time, approached the shrine of the Almighty. Finding a door marked with the sign of the Lynx (and sundry other unlikely names) I entered into a dark and smokey hall which seemed full in equal parts of cardboard boxes, plastic foam, semiconductor components and small gnomes scurrying about, all, so it seemed, answering to the name of Heather. I asked a passing gnome, “May I see G.., er, I mean Mr Marshall please.”, and was told to hang on (which I did with difficulty as the cardboard boxes were stacked mighty high, and wobbled a lot). At last He approached. “Mr. Marshall,” I said, grovelling on the floor, putting on my best ingraciating smirk, and touching the old forelock (which is now quite grey through the frustration which the Almighty bestowed upon me as I left). A giant (amongst the gnomes) looked on, somewhat bemused I remember. “Mr. Marshall,” said I, my voice trembling before this awe inspiring creature, “I’m from XXXXX’s and we’ve been advertising these Nascom 1 things for about three months, I’ve got a waiting list that has filled up my little note book, and we still haven’t had one to play with. Can I please,” grovel, grovel, “take one away so I can see what the heck it is I’m selling.” The Almighty spoke, “My son, take thy leave of this place carrying thy doom away in this cardboard carton, and may the curse of computing be upon thee from this day forward.” I left as quickly as I might, in great fear that the precious cardboard box would be stolen from me ere I reached the door. I had actually escaped with my life from the dread shrine with a treasured Nascom a full week before anyone else got one. And, low, there were not the expected bolts of lightning, nor thunder claps nor plagues of silicon chips persuing me up Chesham High Street. I hadn’t even seen a fiery dragon (the bemused one still looked on, perhaps he was pretending to be the dragon that day, but he showed no tendency to burst into flames). I regained my trusty chariot in great haste imagining my fate, should I be mobbed by hordes of waiting Nascom Customers who had perhaps already heard that I had escaped with some of the treasure in the cardboard carton. I went home.

Page 32 of 55