Unlimited Power!

In the months following my introduction to programming, my evenings were mostly spent in the computer room and my lunchtimes in the college library, fervently devouring the pages of “Byte” magazine.

Christmas was approaching and I managed to persuade my parents to by me a computer.. My parents were quite poor, but they bought a secondhand ZX81, to be shared between three kids. With a portable TV, I had managed to repair, and half a kilo of Blutack, to stop RAM pack wobble, I was off.

BASIC soon lost its appeal as ideas became greater than the capacity of the computer’s processing power. The programs written in BASIC could never match those commercial games in speed, or the ones written in this elusive machine code, provided as hex dumps in magazines. Time to step it up a notch.

I purchased a book with the catchy title “Machine Language Programming Made Simple for Your Sinclair ZX81 / ZX80 & Timex TS1000”. Despite the amusing pictures of elves that were scattered throughout the book, learning the concepts behind the CPU was difficult. I ploughed my way through the book, as I’m sure everyone has done, in a state of “Yeah, ok…. I think, I’ve got it.”. Then, after struggling with one particular chapter. Re-reading the same pages, over and over….. CLICK! All of a sudden, it all made sense.

That evening, I wrote my first machine code program. It wasn’t complex, indeed, it was just a simple counter that displayed the numbers 0 to 65,535,  on the screen. Machine code programming on the ZX81, wasn’t an easy task. Firstly you had to write out the code, in assembler, on a piece of paper. Then you had to diligently convert this into hexadecimal. Next, you had to write (in BASIC) a hex loader program that included fudged REM statements (comment lines) that were large enough the store the machine code program. The slightest mistake in any of these processes…. PFFT! Your program would crash.

With my counter program finally loaded, tentatively, I ran it. DONE! What? No way! Did it just crash? Was there a bug in it?

I ran it again, this time paying a little closer attention to the top right corner of the screen, where the numbers were displayed. Holy crap! I ran it again. The digits were a brief blur, as the program counted from 0 to 65,535, a task that would have taken a BASIC program about a minute to complete, in a fraction of second.

I sat, stunned for a moment, before the wave of realisation hit.

power