Motorola 6800
en.wikipedia.org
en.wikipedia.org
It was a wonderful introduction to how kernels work (or at least concurrency and scheduling) at their most basic level, without having to deal with the complexity of virtual address spaces, memory protection, or the byzantine bring-up dance of register prodding that x86_64 needs. It prepared me well for my operating systems class the next year, and as far as I can tell, was the eye-catcher project that got me an internship on a team doing kernel development the following summer.
The instruction set is also a dream. Super CISC-y, yet more enjoyable (and IMO easier to grok) than x86. Take a look: http://wpage.unina.it/rcanonic/didattica/ce1/docs/68000.pdf
My favorite is DBcc - "Test condition, decrement, and branch". All in one instruction.
[0] - https://i.imgur.com/MKD7wTv.jpg
Here's the code - I have no idea how it works anymore, and I believe it's incomplete compared to what I had running. The complete code archive I think is lost to time - https://github.com/dymk/68k/blob/master/projects/libraries/l...
My friend wrote up a much more comprehensive document on the build:
https://github.com/ZigZagJoe/68k
https://docs.google.com/document/d/1ejW_Ist19tIXeA5HtEWixaLo...
The 68000 is really a different class of CPU entirely, so I'm not sure why folks are discussing it here. Only the name is similar.
OS-9 has an interesting history in its own right. It was ported to a wide range of subsequent architectures. All sorts of applications - Fairlight synths, Philips CD-i, most of the traffic lights in the US in the 80s and 90s to name a few.
As it was necessarily monotone, games came with clear plastic color overlays for the screen.
6809 was notable as the first 8-bit microprocessor with a multiply instruction: 8x8->16 bits.
Crazy what could be done just pushing pixels at 1Mhz!
In fact, the 6501 (architecturally the same as a 6502) was pin compatible with the 6800 and was discontinued after a lawsuit.
I actually preferred aspects of the 6800 series, particularly the addressing options.
So much state. Then throw virtualization into the mix.
The Z80 had that too - DJNZ (Decrement and Jump if Not Zero). Standard way of writing loops.
“The BCT instruction subtracts 1 from the value of the contents of the target register specified in the first argument. If the value in the target register after the subtraction is zero, no branch occurs. Otherwise the program branches to the specified address.”
> [0] - https://i.imgur.com/MKD7wTv.jpg
Based on your description, I expected to see a picture of 30 feet of breadboards filled with jumpers (https://en.wikipedia.org/wiki/Jumper_(computing)), maybe used as ROM or something. Your actual project was unfortunately much less ridiculous.
It is only hsndy when considering interfacing with just older 68xx peripheral chips.
Note: I did wirewrap the full bus for a 68000 schoolproject, plus the address split for high and low addresses (like an odd/even rom) IIRC.
Needless to say the jokers in the US became multi-billionaires, we were stuck on the other side of the world with no one to sell to, and no real knowledge of the marketing we'd need to bring our code to market - if only we'd incorporated we could at least have sold the name :-)
Motorola sued alleging patent infringement and misappropriation of trade secrets.
MOS Technology settled, paid Motorola $200,000 and dropped the 6501.
Yeah, that was what the guy working with the Moto chips smirked at us slaving on Intel 808x contraptions, back in those days ...
[1] https://www.youtube.com/watch?v=zBkNBP00wJE [2] https://github.com/lefticus/6502-cpp [3] https://github.com/CalPlug/Heathkit_ET-3400
There is something special to me about the idea of writing modern C++, and compiling it for such early microprocessors. The 512 bytes of RAM is a pretty big limitation though. I wanted to try and emulate an EEPROM using an Arduino or FPGA, but got stalled out on the project. From time to time I like to browse through the LLVM backend documentation, but I can't seem to commit to trying to build a backend.
I became acquainted with this architecture disassembling the Yamaha DX7 firmware: https://github.com/ajxs/yamaha_dx7_rom_disassembly It's a great instruction set to work with. It's my first experience with 8-bit programming, and I found it very intuitive.
https://github.com/jhallen/exorsim
8 inch floppies! I remember we had an old GE chain-train printer for it which was awesome because it was so fast.
I only have experience with Z80 and 65C02 and I believe the consensus is that a 4 MHz Z80 beats a 2 MHz 65C02, but neither is a particularly nice compiler target.
The Coco could run an operating system called OS-9 which was Unix-influenced and came with a good C compiler and also a bytecode interpreted structure basic called BASIC09.
I know C compilers were really popular among CP/M users running the Z-80 and 8080 chips and also on the IBM PC which had a segmentation system to reach beyond 64k that I thought felt really elegant in assembly language but was awkward for compilers.
Where OS-9 had all the above beat was that it was a real multitasking OS and I had two terminals plugged into my coco in addition to the TV console and could use it like a minicomputer.
When I switched to an IBM PC AT compatible my favorite programming language was Turbo Pascal which adds everything missing from Pascal to do systems programming. I switched to C when I went to college because that was supported on the the various UNIX workstations they had.
There was an external serial port as an option, but there was only one slot. So you also had to buy a slot expander (a Multi-Pak).
In most ways the C-64 was a great machine but boy was the disk drive slow.
I would add the MMU from the CoCo 3, so one can bank in lots of RAM with only minor league fuss.
I had the bit banger connected to a compact printing terminal from DEC that ran at 300 baud and had an acoustic coupler so you could log into 300 baud services with nothing but the terminal. There was not a lot of risk that this device would overflow your buffers.
Results for a few 8/16 bit processors are here (and on subsequent pages): https://archive.org/details/byte-magazine-1981-09/page/n193/...
I muse what could be done with modern cross-compiler (SAT solving for optional code sequences?) A llvm backend for Z80 has recently kicked back into gear: https://github.com/jacobly0/llvm-project
21.4 seconds 5793 bytes
Which is middle of thepack for the Z80 benchmarks, but well below the 6502 ones. We're also using a slightly tweaked embedded printf written in C, so this could probably be improved somewhat there, sans any compiler changes.
It's still an awkward target though.
Z80 had a faster clock, but instructions took loads of cycles. Nowadays that is OK, but Z80 did not pipeline. It had fancy looping instructions, but they ran slower than the loop would have.
https://sites.google.com/site/microprocessorintel4004/8008-8...
There was a C compiler that kept one of the 6502 index registers zero at all times, just to have a zero handy.
This use of a little interpreter to provide a higher-level instruction architecture to program to was really, really common in the 50s and 60s. The Apollo AGC computer that landed on the moon was mostly programmed that way. It seems surprising that with memory so tight, they would use up so much of it for the virtual machine interpreter, but instructions for that could be much more compact than native code. It made a slow computer even slower, but they all felt fast back then.
Steve Wozniak burned a little interpreter like that into the Apple ][ ROM, just smart enough for dumb jobs like copying blocks of memory. It used a reserved fragment of the zero page as its registers.
IMO the Z80 is a lot nicer compiler target than the 6502, because the stack pointer is 16-bit and it's much easier to use the stack in general.
There are a couple C compilers for 6502 (like cc65 and WDC's C compiler) but they're not quite as good as SDCC, as far as I can tell. They're also not as actively maintained.
When was this? What version? Thanks.
I'm not affiliated with the project, but I think would be unfortunate if someone was turned away using or contributing to the best or only opensource tool chain for a number of processors (eg the paduak family) because someone claimed the project was terribly run.
Please consider updating your comment.
https://github.com/BallySternOS/BallySternOS
i've started working on a derivative project using an rp2040 instead of the avr with hopes of offloading the 6800 bus work to a pio
My kit was for the school I was in. It was an STD Bus-based card, nailed onto a piece of wood, with a hex keypad/display.
The card had 256 whole bytes of RAM.
We programmed it in machine code.
The STM8S discovery board for this is $8 and in stock at ST and Digikey.This includes the target system and the ST-Link programmer. There are free commercial tool chains and the open source SDCC toolchain.
https://www.folklore.org/StoryView.py?project=Macintosh&stor...
(I think the guy with the DREAM-6800 ended up making a motza making poker machines)
I'm curious, is this a typical platform in other computer engineering programs in the US?
There are "compatibles" out there, and some of them are very good indeed, but they're not without their hassles.
And, yes, the 68HC11 was on December's EOL list, so I hope anyone who was using it in products has a plan! (Or hire my company, we fix things like that... not that it's the most fun work in the world, we have other things we'd rather be doing....)
The intro to embedded systems course used to be only taken by Computer Engineers around their Junior year, since ~2017 we do it a semester or so earlier and make the EEs take it too as part of a streamline; EEs no longer take the computer architecture course, and the new embedded course covers some basic architecture concepts.
We still do the beginning of the semester in Assembly (we really only show them ARM Thumb) and the later part in C.
Possibly the most revelatory thing about that course is that the low-level view means we find out and try to correct that most of our students (as second semester sophomores who have in theory passed at least two programming courses and a digital logic course) haven't the slightest idea what code actually means/does.
Example: Every semester I've been involved, when we transition from assembly to C, we give a simple assignment to sort some arrays of (well documented) structs by a specified field and order, given the address where first element starts and length in elements, in both C and assembly. They are handed a starter project with a lightly-obfuscated object file that sets up the arrays, calls two provided function headers for them to fill in, then tests if the sorts succeeded. Details get changed every semester because students cheat compulsively on programming assignments, but it's always set up to be easy, the structs they handle in ASM are always 16 or 32b in length, stored aligned, etc.
Many of them... struggle mightily for two weeks because they haven't actually retained anything about number representation, memory (size, layout, byte addressing), arguments, the difference between a value and a pointer, and so on. The course staff spend weeks doing patient remediation around that point in the semester. At least we get a chance to make another pass over that material and more of them get it after.
Wouldn't worry thouhg. Even if that chip is not in wide use now, the skills you learned are transferrable to any other.
There was a more embedded-focus "Computer Systems Engineering" degree option which involved a lot more assembly..
> It has 72 instructions with seven addressing modes for a total of 197 opcodes.
noob question: why so many addressing modes?At 1-2Mhz, sometimes Khz, it was how one got performant code.
Addressing flexibility makes assembly language programming practical for people to do.
Check out the 6809 for a beautiful ISA and probably one of the most powerful 8 bit CPUs.
Everyone nowadays takes it for granted that you can use software to write software. There are still lots of graybeard programmers around who had to make do with punch-cards when they were learning.
I never did punch cards, but I have used paper tape with one of these:
https://w140.com/tekwiki/wiki/4051
And here is a video of the storage CRT: (they are beautiful to watch in person, and the one I used had a 2048x2048 vector space to draw in.
On mine, I had a cassette like tape drive that had some CNC programming tools on it. Another tape had various utilities and some crude simulation programs.
User data was on paper tape, usually source code, or finalized G-code, or plots one might want to reproduce. Frankly, I love paper tape. And I have had to read it, patch instructions in with one of those little machines with all the hand push button punches and index gear to keep it lined up. Same for damaged tapes.
And my first machine language programs were hand assembled from blurry, photocopied data book pages mooched from the local university.
Sidenote: Moto was cool. I asked about documentation later for the 6809, and was able to have my parents take me to a local office where I got to chat with an engineer and left with a pile of docs, and reference databooks!
I did not get an assembler of my own until I mowed a lot of lawns and bought MAC/65 for my Atari. Prior to that, I was typing stuff into the mini-assembler on the Apple.
I was a kid, 14 for that stuff.
Later at 19 I ended up working in small shops using Tektronix hand me down gear while attending college. Super glad I fell into that experience frankly. Those Tek computers were odd, but well conceived and more powerful than one might think 8 bit stuff could be. The people in that shop made some impressive stuff essentially laid out and programmed on a 6800 CPU found in the Tek storage tube terminal / computers. They were interesting designs.
One could get one and just set it up for serial comms and use it as a weird but capable text display and or, graphics display like a paperless plotter. Xterm has Tektronix mode to support that even today.
Add some ROM and RAM, and peripherals, and then it was a powerful, technical computing micro computer. Disk drives, cartridge tape, paper tape read and punch, plotter, joystick, and off you go! Never did get to use a disk. But that fast cartridge tape drive and paper tape worked better than expected.
What I find interesting is younger people are checking this stuff out and or building their own gear. 8 bits is enough to really do stuff and understand the entire thing. While not practical given what we have today, it all is still educational in a way that appears to remain potent.
For my own fun reasons, and some product development, I have the luxury of...
I keep an Apple //e Platinum on my work bench. And I use it to do electronic projects the same way I did as a kid. Good for simple prototypes or to understand a sensor, do comms. When my current project slows, I plan on making a card with a Propeller chip on it to make a cool dev station that works like an Apple with command line, just type a line and go BASIC, as well as self hosted compiler and assembler... good times. And practical. People I work with and I have done a couple designs. It all works just fine and it is simple. No updates, no OS, just lean and mean.
Not only this. It made for more compact code, and memory was very expensive. So expensive that 64kB was practically unheard of. In 1980, 4kB would cost $100 or so. If I read it correctly, the original board with the 6800 was shipped with 128B.
128 bytes is a lot! Seems absolutely insane small now, but back then every bit mattered. And being so close to the hardware meant being able to do things super lean and mean.
On the KIM 1, the RIOT chip came with 128bytes of RAM, and Rockwell, MOS, and others also later packaged the CPU with small amounts of RAM, timers, and other handy things. Early origins of system on chip designs. And there was a jumper or solder pad one could use to sort out address decoding should more RAM be added.
128 bytes, probably split between zero page and the stack, can do a lot!
For perspective, the Atari 2600 had 128 bytes of RAM in its RIOT chip and that was the total system RAM!
Atari 2600 Space Invaders fit into 4K ROM and the 128 bytes of RAM.
No frame buffer, no tile engine!
Graphics were generated line by line, game logic happening during the screen blanking period!
No lie! I recall paying $200 for a Godbout 12KB (static RAM) board kit (96 1K chips to hand-socket) for my H-8 (8080; Heathkit included no RAM). Later added another 12KB for an incredible 24KB total. Only a few years later at a swap meet I landed two 16KB manufactured boards for only $50!
A similar thing happened with SGI workstations. Drop $20 on a high end box, score one for a fraction on ebay some while later. Not long enough later.
On those, people writing programs was common.
Bigger systems, kilobytes and larger, saw the use of macro assemblers were far more common.
The first assembler I bought was a Macro assembler.
If you have plenty of registers and a pipelined processor with a decent bypass network to get intermediate results available earlier, then it makes sense to simplify the addressing modes (to increase frequency and/or shorten the pipeline). However, the 6800 had neither many registers nor a pipelined ALU.