CEGMON – a blast from the past

You can blame Phil Beauvoir for this one. 🙂

A few days back, the grand-master of the justly-famed Archi Open-Source toolset for Archimate (version 2.7 just released, by the way) put out a tweet that, in essence, said that his earliest experiences of programming went back to the Sinclair ZX-81, first released in 1981. Which sent me off on a kind of Wikipedia-trail through old memories…

My own programming experience perhaps goes back a few years further: my first microcomputer – if it can be called that – was the Acorn-1, with its 25-key keypad, 8-LED display, and – gasp! – 256-byte memory. (Not 256Mb – these days considered pathetically small even for a phone – nor 256Kb – considered somewhat limited for a micro even by the mid-1980s – but just plain 256-bytes. And yet one could do quite a bit even with that. In those days, anyway.)

The reason I’d got involved – apart from being fascinated by all things computing-ish for decades anyway – was that we’d recently bought a photototypesetting machine. Which was ludicrously underutilised: it could typeset far faster than an operator could type. If we were going to get a decent return from that very expensive machine (I’m not joking when I say that it cost more than my house), we would need to have more input. But it ran on paper-tape, and the only add-on terminal available was a blind (no-display) paper-tape punch that cost literally ten times as much as even the upper end of the hobbyist computers coming onto the market at that time. And yet the typesetting-machine itself was all electronic; the interfaces were all electronic; there had to be some way to link it to a relatively-cheap external micro (with display) rather than only to an antiquated and hugely-overpriced paper-tape punch (without display).

The Acorn-1 was enough to demonstrate that the idea was feasible, but nothing more than that. At the very least, we’d need something that had a decent keyboard and display – a lot better than, say, that of the original Commodore PET, let alone the Acorn’s. After some hunting around, we settled on the Ohio Scientific Challenger 2 – though in our case initially without the (then) ruinously-expensive disk-drives:

Nice machine, very nice keyboard: it worked really well. After not all that much tinkering, and some help from a friendly electronics engineer, we got it patched-in to the typesetter, using a simple lookup-table to do the code-translation between character-sets. All a bit wobbly and experimental, but that worked well enough, too. So much so that we were soon hankering for more.

There’s another whole stream to this story that I won’t go into here, that ultimately led to my/our work on the first true precursor to present-day desktop-publishing, way back before even the Macintosh itself existed. (By 1982 or thereabouts we were able to typeset a reasonable-sized book from WordStar files in less than an hour, and even typeset crossword-puzzles, too – and yeah, we paid the usual penalty for being way ahead of our time on that… Oh well…) But perhaps the key point was that in those days, anything non-trivial on micros was all in assembly-language – which is where CEGMON comes into the picture.

The whole Ohio Scientific community loved their machines – especially the cheaper single-board Superboard and its UK-101 clone – but almost all of us bitched about the inadequacy of the SYSMON ‘monitor’, the boot-program and its very limited machine-code viewer and editor. Eventually, Dave Graham at Mutek – the main UK dealer for Ohio Scientific – decided to do something about it. He called on me, and two sound-engineers – George Chkiantz (inventor of the phasing sound-effect, first used to great effect in the Small Faces’ hit ‘Itchykoo Park‘) and Richard Elen (later best-known for his work on sound-field recording) – and commissioned us to write a better monitor.

The original was tiny. Despite the Wikipedia description, it was not 2Kb, but only 1Kb – and of that, some 256bytes were the boot-code for the disk-drive, of which we could make no sense at all, so had to leave it exactly intact. Dave Graham had shown, though, that the board would support a 2Kb EPROM chip: so 2Kb – less that incomprehensible disk-boot code – was the (huge!) space that we had to play with.

And as the Wikipedia entry says, we packed a lot into that space:

at least two third-party companies produced their own version of the OS. One version was called ‘CEGMON’, the other was ‘WEMON’ produced by Watford Electronics in the UK. Both featured full screen editing (almost identical to the commodore PET), named cassette file handling (like the PET) and a greatly improved machine code monitor (also very similar to the Commodore PET).

It may ultimately have seemed similar to the PET: I have no idea. What I do know is that we didn’t look at the PET at all, but instead went right back to first-principles, concentrating only on what we wanted in that monitor. For example, we put in a dual-cursor editor – later replicated in concept if not in code in Acorn’s very popular BBC Micro – and a full windowing display that allowed the programmer to set and write to subsets of the screen-area. I think we managed to squeeze in a rudimentary disassembler to show machine-code as assembly-language, but I’m not sure of that. We kept on squeezing, trimming, adding new features, until eventually there was nothing more we could do. We still had three bytes of space left over, so in effect we signed our work, putting in our surname-initials as the three-byte hex-string #434547 – ‘CEG‘, for Chkiantz, Elen and Graves. That EPROM was what Dave Graham sold as CEGMON – again, our surname-initials, and then ‘MON’ for ‘monitor’.

We didn’t make much money out of it, of course – certainly not enough to cover the enormous cost in time and effort that went into our making it. But in its own way it was a real achievement – something in itself, we might say – and, for me, definitely helped with laying down the disciplines that I’d need when I moved on to the much larger and much more complex software-development (all assembly-language, again) for the later work on desktop-publishing.

One reason we didn’t make much money was that we soon had competitors – other monitor-EPROMs for the Superboard and suchlike. For our amusement, we decided to disassemble one of them – it might have been WEMON, as per Wikipedia, but I really can’t remember now, and it’s probably best not to say anyway – and we got quite a shock. There were a handful of additional features, to be sure, but all of those were squeezed into the 256-byte space made available by discarding the disk-boot code. The rest of it – all of the rest of it – was our CEGMON: an exact byte-for-byte copy, in fact, including that #434547 ‘CEG‘ signature-string – a real giveaway! We complained about it, loudly, and publicly, but there was nothing we could do – such were the joyous business-practices of the time…

But there it is: CEGMON – my one-and-only Wikipedia claim to fame!

Okay, to be precise, only the letter ‘G’ in that name.

And even that only as a kind of secondhand-aside in someone else’s Wikipedia page.

But hey, at least someone remembers some of what we did back then! 🙂

The rest, as they say, is history. Mostly-forgotten history, by now, but history nonetheless.

Blast-from-the-past indeed… Thanks, Phil!

21 Comments on “CEGMON – a blast from the past

  1. That’s a really great story, Tom. Thanks for sharing. I remember those pre-ZX81 machines from the computer magazines at the time. Pioneering days, eh? The computing equivalent of the early space programme. Programmers (they weren’t called “developers” then”) were squeezing Chess programs into less than 1kb.

    “We still had three bytes of space left over…” Luxury! When I was lad…http://www.youtube.com/watch?v=Xe1a1wHxTyo

  2. Thanks for the post and history. This past year I dusted off my old C1P and fired it up for the first time since the 80’s. Amazingly it still worked except for a few keyboard switches which were easy enough to fix. I was wondering if the source code is still around for CEGMON. I’d love to take a peak and see how you managed to squeeze all of that into the space you had to work with. I’m sure it would be educational and improve my extremely rusty 6502 assembly knowledge!

    P.S. I still have my old Kim-1 and it still works too 🙂

    • Hi David

      (Apologies for slow reply – have been a bit distracted / destructed of late…)

      Source-code for CEGMON? – very unlikely, unfortunately. Okay, I’m a natural keep-everything squirrel, but I’ve literally moved house between continents three times since then, and most of what I’d had back in the 80s has long since been lost. Ditto for Richard I guess – I know he too has moved between continents at least a couple times; the only one might have a copy is George, and I lost contact with him at least a couple decades ago… 😐

      The simple option would be to get hold of the EPROM from somewhere and disassemble the code: it shouldn’t be that hard. Remember that the boot-loader is in there somewhere – in the later part of the second kilobyte, at 0700-07FF relative, I think? – and is almost incomprehensible (I suspect it’s actually for a different controller that can access the same ROM), but as long as you remember that it’s there, you can basically ignore it as long as you leave it alone. The only trick you’d need to remember is that the C1P/Ohio Scientific machines used the very first part of the usable RAM – starting at 0200, above the page-zero registers and the stack – as the base for the video-pointers and other such stuff. I know we put our window-position registers in there, though after several decades I can’t remember quite where! 🙂

      Have fun, anyways.

  3. I always wondered what the CEG in CEGMON stood for, now I know. I am surprised to learn that the C2-4P version of Cegmon came before the C1P/UK101 versions, I would have expected it to be the other way around. Anyway, you did make one small but useful change to the disk boot code of the 4P, making it jump to the first byte that was loaded when done, wherever that was, rather than blindly jumping only to address $2200 (the C1P already did this). One annoying thing about CEGMON’s editor was the choice of control-A, S, D and F for moving the edit cursor left, up, right, and down; a WordStar-style “diamond” arrangement of keys might have been better. As for it being for “a different controller that can access the same ROM”, it’s true that the original C2-4P or C4P machines never had both the Basic-in-ROM and the disk controller in the same machine, although the C1P disk version did. But with CEGMON, it became possible to have both in the same machine, and a number of people did that. BTW, there is a small but dedicated group of people still using (and restoring) OSI computers at http://www.osiweb.org/osiforum, also a Windows emulator for OSI machines at http://osi.marks-lab.com.

    • Thanks, Danny!

      You said: “I am surprised to learn that the C2-4P version of Cegmon came before the C1P/UK101 versions”

      One reason why was the relative dates of release: the C2P came first, the C1P (Superboard) quite a bit later, and the UK101 later again. All three of us were using C2Ps in our own work, and we’d already started work on CEGMON by the time the Superboard became easily available on the UK market; we did a later update to work with the UK101.

      You said: “One annoying thing about CEGMON’s editor was the choice of control-A, S, D and F for moving the edit cursor left, up, right, and down; a WordStar-style “diamond” arrangement of keys might have been better.”

      Yes, it would – in fact my memory is wrong on that, because I’d thought we had. (It may simply be that we hadn’t come across WordStar at that stage? – again, I can’t remember. Do note that all of this was perhaps a year or more before mainstream CP/M-based micros became cheap enough for WordStar to become popular, and still several years before the IBM-PC effectively standardised the market.)

      If you want to blame someone, you can blame me 🙂 – though I think all three of us had a hand in it, to be honest. There may have been some kind of key-clash with the hardwired key-assignments of the old OSI-monitor – again, I can’t remember. What I do remember is that the core feature was that there were two cursors, not one: one for selecting the position to edit into, and one for copying the text (or other content) at some respective point. (As I said in the post above, this two-cursor mechanism reappeared exactly in the much later BBC Micro.) This meant that we needed two sets of cursor key-assignments, not one – and that may have been what caused us to set it up the way that we did.

      Congrats on all of the work you’re doing to keep the OSI flag flying – they were great machines, and they did their job really well, for what they were. And I’m really glad to hear that at least some of our work from all of those years ago is still useful to you! 🙂

      Best wishes to all the OSIWeb group, anyway – and thanks again.

  4. Another satisfied CEGMON customer here. Just reaching out to say “Hi”, and thank you for the excellent product that transformed my Superboard II back in the day. I’d installed the screen mod (for 64×32 IIRC) but was loading a patch manually every time I booted. CEGMON fixed that and gave me an editor that worked really well.

    I learned the basics of coding on the Superboard, and even manually assembled so machine-code routines. When the BBC Micro appeared, I ditched the Ohio for the shiny BBC Basic, hi-res graphics and in-line assembler. I don’t regret that for a second of course, but I REALLY wish I’d hung on to the Superboard, instead of selling it. Hey-ho.

    Strangely, the Chkiantz/Elen/Graves root of the name is etched in my mind, but I only realised the Itchycoo Park connection today(!), even though the song has been a favourite for many years.

    Best Wishes, and thanks again.
    Andy.

    • Many thanks, Andy – delighted to know that our work was useful! 🙂

      “I wish I’d hung on to the Superboard” – yeah, a lot of similar regrets here. A lot of things that I now sorely miss got left behind or lost somehow in an all-too-literal career across the decades and continents. Gettin’ older now, though, so having to get more used to rather too many things that don’t work well any more. Sigh… 🙁 🙂

  5. Thanks for the walk down memory lane. There’s a small revival of interest in the OSI computers thanks to the work of Grant Searle and his Multicomp project. He put a UK101 into a single FPGA. Many of us have followed in the path he blazed. But you were there before any of us.

    Grant’s project is at: http://searle.hostei.com/grant/uk101FPGA/index.html

    My own build is at: https://github.com/douggilliland/MultiComp/tree/master/MultiComp_On_Cyclone%20IV%20VGA%20Card/UK101_16K

    So, CEGMON lives on. Please don’t sue us. Thanks for all your hard work.

    • Doug – this is wonderful news – I’m really delighted! 🙂

      (“Please don’t sue us”? – oh, c’mon! 🙂 Okay, yeah, I guess some people really are that stupid about their ‘possession’ of ‘intellectual property’ that’s already almost forty years old, but I’m far more excited that people are finding it useful again.Yay! That’s speaking just for me, of course, but I’m pretty certain that Richard (Elen) and George (Chkiantz) would feel the same way. If you need to contact them, these days Richard lives in Forres, in Scotland, and last I heard George was living somewhere in France: I don’t think I still have emails for either of them, but Richard is on LinkedIn https://www.linkedin.com/in/richard-elen-2242a52/ and you should be able to reach George via him as well.)

    • A gesture much appreciated, good sir!

      (Now, to complete the circle and make this all fair, do you have a link where I can in turn donate to your project?)

    • I’d be happy to help on that if I can, but as per my comments to Danny S and David Jones above, I’ve long since lost all of the documentation. At present I’m based in Colchester, in England, so if anyone happens to be round this way (or could also meet in e.g. London or Cambridge), then I’d be happy to chat about what I can remember of how it works.

      Three points:

      — The boot-loader for the disk occupies its own 256-byte block of the ROM, and is not 6502-code – hence complete gibberish to a 6502-disassembler. I said above that it was at #0700-07FF, but it’s more likely to have been at #0300-03FF (i.e. last block of the original 1kb ROM, not our extended 2kb EPROM).

      — Other than the boot-loader, and that #434547 ‘CEG’ signature-string’, everything else is real code. (Okay, I guess there must be a handful of text-strings, for the code-monitor etc, but you’d be able to work those out from the manual?) The overall functionality should be clear enough from the manual or the initial screen, I’d hope, so that should give some pointers as to how and where to start the structure-logic for the disassembly.

      — A useful trick to remember is that those OSI machines made hefty use of the very first few bytes of usable RAM. The 6502 reserves #0000-00FF for its own use (‘page-zero’ opcodes), and there was something special about #0100-01FF that I now can’t remember. So we had to use later in the RAM for our own registers, hence there were a lot of references in CEGMON to the #0200-023F range, where we stored pointers to things like current window-origin, width and depth (for the simple windowing system), and the current positions of the two cursors (pointer/copy-from cursor and copy-to cursor). If you look in the disassembly for single-bytes or more often byte-pairs in that range, you should be able to work out what each of those registers does from there. (The screen-space is directly-addressable memory, as I remember, so those two cursor would have to point to there, for example.) Also, if I remember correctly, the first code-instructions at #0200 were a jump to the start of the first user-code, so one thing that the boot-prom would have to do is set up that jump.

      Hope that helps a bit, anyway?

  6. Hi Tom,

    I’m a very happy CEGMON user from back in the day.

    I believe my UK101 is still at my Dad’s house in the garage

    When I get back to the UK, I am going to power it up again

    Hats off to you for packing so much functionality into such a tiny space. I am pretty sure there is a disassembler.

    Best

  7. I now live in Colchester too but, I used to live in Morden, surrey and visited George Chiantz on many occasions as I had created a “64 Character Mod” for a 2k Superboard II and the mod allowed for contiguous video memory.
    George generously tweaked versions of CEGMON to allow for a 64 character width superboard which, when you consider the original character width was something like 24 characters, made the SII a really nice machine.

    As an aside, I modified the character set chip to print “CR” and “LF” when $0D or $0A were written directly to screen memory.
    I developed a printer buffer board and I designed some of the code on the SII screen so I could check what was being written to store memory.

    Happy days.

  8. Just found this, amazing, I too was an extremely happy cegmon user and my superboard helped carve what turned in to my career. Thank you for all three work you put in to making it. I still have the whole lot including home made ram board and lots of add-ons sold by premier publications in Croydon.
    Such happy and inspirational times.

    • Many thanks for that, Richard! (I must say, I like your ‘Nixology’ website – it does indeed re-invoke that sense of ‘Such happy and inspirational times’!)

  9. Hello!
    Like the other comments – I was a very very happy Cegmon user on my superboard.
    I have one with the display mods (performed by Mutek?) to give the larger display (48 x 32?)
    I still have the machine though not powered it up for decades.
    I was a total addict at the time, fitting all the Premier Publications updated BASIC roms and toolkits – eventually building their disk controller, soundboard and printer interface (which connected to an actual Centronics 737 printer) and loads of other stuff.
    Like previous posts – I am confident that my Superboard Experience (aided greatly by Cegmon of course) shaped my career path which whilst not always focussed on coding – certainly built that foundation of knowledge that I now rely on for my hobbies.
    Thank you for all the work you and your colleagues put in.

  10. That’s great, Richard – many thanks indeed for that! I’ll admit I do sometimes struggle with depression, and a general feeling that I’ve contributed nothing with my life – these kinds of comments do remind me that I actually have done a lot in my aptly-named ‘career’, in all kinds of strange ways!

    The main use I’d made of our Ohio Scientific machines was to drive our typesetting-systems – one of the first in the world adapted specifically for use in typsetting for microcomputers, as the immediate predecessor for what’s now known as desktop-publishing. I recently rediscovered all the manuals I wrote for it, including the design-spec for the cross-compiler language that I created for our software-development. We did a lot of really innovative stuff, including auto-generated rates-tables for one of the big banks; page-layouts for illustrated part-works ( think that was for either Readers Digest or Dorling-Kindersley, but I can’t remember now); and crossword-puzzle books for the Daily Telegraph, again auto-generated from a question-answer file, auto-verified to ensure no errors. Most of that is long-since gone, of course, but one part does still live on in much-modified form in a system used by newspapers to generate their puzzle-pages, developed by our then manager Mike Mepham (see http://weblog.tetradian.com/2006/12/23/vale-mike-mepham/ ).

    All a long time ago now, though. I’m gettin’ old… 😮 🙂

  11. Great bit of nostalgia… Very disappointed to discover I had bought Watford Electronics WEMON and it was a rip of CEGMON

Leave a Reply to Tom G Cancel reply

Your email address will not be published. Required fields are marked *

*