the story of the 1802 HHC

as i remember, the ball started rolling one Autumn in the late '70s - there was a sense of expectancy in the air: the microcomputing revolution was gaining pace

not fast enough for me, however

the micro held out the hope of me owning my own computer

i was used to programming on a minicomputer that could have doubled for one of Stanley Kubrick's megaliths in '2001 - A Space Odyssey', and i wouldn't be satisfied with anything that offered only Hex keypads and LEDs as the user interface

...although even the dear old Data General Nova had its share of switches and lights - an inheritance that i wouldn't be able to escape from entirely

so the seed was sown

the original idea was to build a modular system in a rack, with a back-plane and separate boards for processor, memory and I/O - the CPU of choice was to be the Motorola 6809, a thing of beauty in a world of strange-things

there were several 'build-your-own-computer' articles in the computer magazines (eg. 'Elektor', 'Practical Electonics', 'Wireless World' etc.) but all the systems seemed to be either restricted in some way or over-complicated for my needs

i started to develop designs for things like system backplane busses, cassette I/O, TV monitor interfaces etc. - and some weird logic-craft they were, too!

i can't remember at what point i decided to go for the 'hand-held' solution - maybe it was from being inspired by the pending release of the Panasonic/ Quasar hand-held microcomputer

...or perhaps it was the subsequent realisation that the Panasonic/ Quasar hand-held micro was destined to be more pending than released

the threads of my future creation's DNA appeared here and there, waiting for me to recognise them and realise their significance to my project

a DIY keyboard here, a battery-backed RAM 'chip' there

of course, one of the major hurdles to a successful (and hence, useful) system was the problem of software 

software? what software? ...exactly!

there was only one language that seemed to come anywhere near the possibility of being implemented on a home-built micro - it was BASIC or nothing

so, for a long time, it was nothing

then, one of those DNA threads came to mind.

several years earlier, sometime around '76 or '77, a letter had arrived at our research lab, describing a new computer language that was being tried out at Imperial College and inviting other groups to join the evaluation

we sent off for further information and received a tutorial introduction (printed on about 20 sheets of fanfold lineprinter output) and a thick photocopied manual which contained fascinating behind-the-scenes glimpses of what it was that made this language unusual

we all took a look at the documents and decided that the most sensible thing to do with them was to file them under the letter following 'z'

now this, if you'll pardon the mixed-metaphors, is where the mental sleight of hand came in - somehow, with the passage of time, and the intense pressure to avoid anything whatsoever to do with BASIC, my mind had not only remembered this strange offering but it had also decided that this was the perfect solution to the problem of developing software on my intended system

best of all, some pre-echo of synchronicity had caused me to hang on for dear life to everything filed under the letter after 'z'

now when i say 'perfect solution' i mean perfect for crossing the software IMPLEMENTATION bridge - there was still, of course, the slight problem of knowing how to USE the language

for the language was Forth

it has been said that you can tell a Forth programmer by the bad puns they introduce into titles of books and documentation sections, and if that were true then that photocopied Holy Grail would be called something like 'Rather Moore with Forth'

as it was, the authors - Charles Moore and Elizabeth Rather - decided on something much more prosaic like 'A Technical Guide to Forth Programming'

try as i might, although i could see the words on the pages clearly, the meaning somehow slipped through those mixed-metaphoric fingers of mine

i read the manual from top-to-bottom, side-to-side, front-to-back, and even - since this was a reverse-polish language - from back-to-front

everything seemed to be presented in isolation, and moreover, nothing appeared to do very much

around this time an article had appeared introducing the RCA Cosmac microprocessor (CDP1802) - the circuitry was fairly sketchy, but it looked accessible

i sent off for a set of manuals from RCA relating to the 1802 - it seemed to have a lot of dedicated support chips and software, which i didn't think i could afford

the magazine article held out the possibility of using standard logic chips with the 1802 to reduce the complexity and the cost  - and this rather minimalistic approach appealed to me  - i was hooked

i sketched out a preliminary design for an 1802 CPU board (used as the page background to this site) which provided a system bus, full DMA control decoding, an open-collector interrupt line for expansion, a programmable timer signal,  with interrupt, to enable multi-tasking, keyboard input latch with interrupt, and a display output latch

having settled on a hardware target, i returned to the problem of producing the software which would run the thing

more synchronicity occurred, this time in the form of an issue of 'Byte' magazine which was dedicated to the Forth language - between that and the Forth Inc information i was able to deduce enough about the internal workings of a threaded-code language to start constructing my own version

for several weeks, i spent every lunch-break at work developing a Forth implementation on one of the 8080 development systems i used there

it was a very weird feeling writing a computer language which i had never seen in operation and which was based on unconnected scraps of information, never intended as an implementation guide

eventually, i had written enough for it to spring into 'life' - but was it really Forth?!?

however, it worked - that was enough for me!

shortly afterwards, i had the opportunity to rejoin a research group at Brighton Polytechnic who were then in the process of setting up a microcomputer laboratory in the Elec Eng department

if it processed bytes, and stayed in one place long enough, i implemented Forth on it

within a short period of time, we had Forth available for developing embedded/application software on an Apple II, on Nascom, and DAI microcomputers, and on the venerable Data General Nova 820

many of the students were producing embedded-code hardware systems for their final-year projects and the Forth environment enabled me to provide cross-assemblers, cross-compilers, downloaders, etc, to install and run embedded Forth code on their project boards

with all this Forth experience under my belt i felt i could start to concentrate on the hardware for my own microcomputer and i began to refine some of the design ideas i had sketched out previously

the one luxury i allowed myself in the design was to buy a TWO line LCD display (for this was 1981, dear reader - LCD displays were new, expensive and my disposable income was heavy on disposable and light on income)

i anticipated that i would need a minimum 'window' of two lines to edit code on a system: one line to enter new text and a second line to give some indication of whereabouts i was in the code

actually, there were two luxuries: i also bought a 'badge-engineered' portable printer used by the Tandy BASIC hand-held micro - it printed on narrow rolls of paper, about 16 characters wide

i managed to decipher the strange double 4-bit serial data scheme it used to transmit characters (using its own non-ASCII code scheme) - the HHC printer driver output Forth source 'blocks' as 4 sequential columns - i was able then to literally 'cut-and-paste' the output back into pages of source code

eventually i replaced the original printer with the Tandy 4 colour plotter - this provided scalable fonts, full page-width printouts, hi-res vector graphics ...all from a Cosmac 1802 - what a dream!

the 'mass storage' device was cassette tape - i had found an article outlining a scheme called Manchester bi-phase encoding in 'Wireless World'

it was a neat arrangement of frequency encoding that gave the maximum data bit/encoding frequency ratio, an inherent synchronising edge at each bit boundary, and it could be recorded/replayed directly to & from an unmodified  cassette recorder using the mic & earphone sockets

the HHC cassette I/O used Forth 'code' definitions to transfer data at 2400 baud - the only signal conditioning required in hardware was some slight edge filtering on recording, and a Schmitt-trigger circuit to sharpen the signal edges again on playback

i added some data 'packaging' around the raw data bytes to enable Forth to read and write 1 Kb Forth 'blocks' of source/binary data with a checksum appended

in addition to its use for printing and cassette I/O, the serial connection is also programmed to read & write RS232 data using a  single-transistor level changing circuit - Forth 'code' definitions are fast enough to enable reliable serial transfer at 9600 baud using a 2.5MHz crystal for the processor clock

i made most of the the case and keyboard out of marine ply and ramin, and the side walls out of a softer solid wood

my only regret, when i completed the computer was the rather 'chunky' size and weight of the unit - it is possible to use it as a hand-held device - but only just!

the neatest feature for me, apart from having completely customised portable computer hardware and software,  is the benefit of having the whole memory as battery-backed: i can add some new definitions, switch the HHC off, and then when i switch it back on later the new code and the source 'blocks' in the screen edit buffers are still there - upgrading or modifying the 'core' is  just a matter of unsetting the write-protect switches and downloading the new binary code from the PC using the monitor 'kernel' on the HHC

once completed, i started to use it as a tool for Forth-based project development - it doesn't have a huge amount of free memory but it has enough to develop and test ideas for incorporation into larger projects on other Forth machines and to host smaller applications

one of my projects was to produce an 1802 simulator in Forth - this takes 1802 binary code and allows either single step display of all register, stack and i/o conditions as the code 'runs' - or it can be run with monitoring off to test larger sections of code up to a break-point

the HHC has also been useful as a programmable I/O device eg. to monitor and debug serial I/O data between other devices; as a sequencer for a homebrew 'drum' machine, etc.

surprisingly, it's still operational and a few years ago i upgraded the operating system from Forth Inc style to a combination of Forth-79 and FIG Forth