6 ms·
Did a lot of embedded 6809 assembly for satellite ground station equipment in the 1980s. I really enjoyed coding for that platform. Some of the things that se
by anonymousiam 6y ago
Did a lot of embedded 6809 assembly for satellite ground station equipment in the 1980s. I really enjoyed coding for that platform. Some of the things that set it apart from contemporary 8-bit processors:
Multiple stack registers for complex argument passing.
Internal 16-bit registers.
(Integer) Multiply/Divide.
Sign extension (SEX instruction!)
Years later I did some embedded OS/9 (Not the Apple OS, but the Microware one.) The target was actually a 68k, but the OS had been ported from the original 6809 platform. It was pretty powerful for the day and although not completely POSIX compliant, it was very POSIX-like.
- Mountain_Skies 6y agoWonder how difficult it would have been to get OS/9 or Flex running on a custom build like this.
- buescher 6y agoProbably not too hard. There's a port of NitrOS-9 to this crazy thing, for example: https://www.frontiernet.net/~mmarlette/Cloud-9/Hardware/Liber809.html https://www.frontiernet.net/~mmarlette/Cloud-9/Hardware/Libe... I haven't tried his CUBIX on his emulator yet, but there's a certain richness to systems that start with a full fledged debugger on the bare metal. And he's got his own assembler, Forth, BASIC, APL, C compiler...
- jacquesm 6y agoOS/9 should be trivial to port, it was written with that goal in mind.
- colejohnson66 6y ago> Internal 16-bit registers. What does this mean? Aren’t all registers (for any mainstream processor) internal?
- canadian_tired 6y agoIt is really an 8-bit CPU from a bus (external connections) perspective...but internally, there were 16 bit registers (sort of...) Perhaps this was why he made the distinction.
- jhallenworld 6y agoIt's the link between 8-bit and 16-bit: at least that's what Motorola marketing said, look at the cover of this book: https://www.amazon.com/MOTOROLA-MC6809E-MICROPROCESSOR-PROGRAMMING-M6809PM/dp/B000P69K28 https://www.amazon.com/MOTOROLA-MC6809E-MICROPROCESSOR-PROGR...
- ddingus 6y agoI have a copy of that book near me. For a very long time, Moto would send docs out for the mere asking. Free of charge. I got mine as a high schooler. Didn't use the mail though. Instead, I visited a local Moto office and they handed me the ones I wanted and I got to talk chips with the people there for a while. For a small town kid interested in all this stuff, that made quite an impression. Instant Moto fan.
- Zuider 6y agoThe 8-bit A and B accumulators could be addressed together as a 16-bit D accumulator. The contents of A and B could be multiplied with the product stored in D. There were also two 16-bit index registers with advanced and versatile addressing modes, X and Y, along with 16-bit user and system stack pointers, U and S.
- jacquesm 6y agoThe 6809 and the 6502 had a 'fast register file' page aka the 'zero' page on the 6502 which could be relocated anywhere in memory in the 6809. These were looked at as an external extension of the register set and lots of instructions could use the data there as 8 or 16 bit data or pointers.
- Zuider 6y agoNot all. The Texas Instruments TMS9900 designed as a single chip version of the TI 990 minicomputer series had three internal 16 bit registers, but 16 general purpose registers in RAM.
- jhallenworld 6y agoI also wrote a lot of 6809 assembly in the 80s- for broadcast character generators. I wrote a multi-tasking operating system for it at one point- I used the DP register to point to per-task local storage (exactly like errno in multi-tasking UNIX). My co-workers went nuts with the PC-relative capabilities, but I didn't bother- those addressing modes were pretty slow. We had a cool piece of hardware: an in-circuit emulator. The 6809 version of this one: http://www.decadecounter.com/vta/articleview.php?item=1064 http://www.decadecounter.com/vta/articleview.php?item=1064 That thing was the bomb, because it had trace memory so you could watch what led up to an interrupt causing your system to crash. Non-symbolic though, you needed the linker map and assembly listings by your side to do anything.
- anonymousiam 6y agoThere were some great tools for that platform. I used a different brand ICE, but also an HP1630D logic analyzer with a processor chip-clip and a built-in disassembler so you could see where your code failed. (Worked great for finding hardware problems too.)
- jhallenworld 6y agoSo if all you have is a Tek 465 scope, you can make a poor-man's logic analyzer by connecting an oscillator to the reset pin, and trigger off of this pin on the scope. Then use the delayed sweep knob to scan through the bus, one or two bits at a time.
- ddingus 6y agoThis is a cool trick! I plan to try it next chance I have my Tek 4 channel out for a play.
- buescher 6y agoThat emulator looks amazing. It must have cost a fortune at the time!
- 6y ago
- jonsen 6y ago> (Integer) Multiply/Divide. As I remember it, it had the instruction MUL, which did 8 by 8 bit unsigned multiply, but no divide. Maybe the Hitachi CMOS version had it? I know this version had undocumented additional instructions. EDIT: WP says it had hardware division: https://en.m.wikipedia.org/wiki/Hitachi_6309 https://en.m.wikipedia.org/wiki/Hitachi_6309
- jacquesm 6y agoThat is exactly correct. You beat me by 60 seconds, while writing up my comment, I saw yours after posting. Interesting, I wonder how many neurons I'm wasting on useless 8 bit instruction set trivia.
- jonsen 6y agoSame here :), but a beauty like 6809 is worth remembering.
- jacquesm 6y agoYes, and it actually is one of the easiest sets to remember because there are so few exceptions. Everything that you expect to be there is there and works like you expect it to.
- DonHopkins 6y agoI always thought of the 6809 as the Chrysler Cordoba of 8 bit microprocessors, with soft Corinthian Leather upholstery and a luxurious automatic multiply instruction. https://www.youtube.com/watch?v=Vsg97bxuJnc https://www.youtube.com/watch?v=Vsg97bxuJnc "I have much more in this small CPU than great comfort at a most pleasant price. I have great confidence, for which there can be no price. In 6809, I have what I need."
- jacquesm 6y agoThe BS marketeers come up with never ceases to amaze me.
- jacquesm 6y agoThere is no divide instruction. You had to write a subroutine for that, you could mask it as a macro on a half decent assembler but the CPU did not have it natively, it did have 8x8 multiply.
- Stratoscope 6y ago> Sign extension (SEX instruction!) We were definitely into SEX in those days. In the late 1970s I was working at Tymshare, and one of my tasks was maintaining the assembler and linker. (I think this was on the PDP-10 but it could have been another machine.) We wanted a "weak external" feature, somewhat akin to a "weak reference" in modern languages: instead of failing to build if the external symbol was not defined in another object file, it would link OK but leave a null value that you would check at runtime. The assembly directive for a regular external was EXTERN. I thought of calling the weak external WEXTERN but that looked silly. So I decided to call them Secondary Externals, with the directive being SEXTERN. And as far as I know, no one complained!
- DonHopkins 6y agoThe 1802 had a SET X REGISTER (SEX) instruction, as well as a GET HIGH (GHI) instruction. https://www.atarimagazines.com/computeii/issue3/page52.php https://www.atarimagazines.com/computeii/issue3/page52.php John Draper (Cap'n Crunch) once creepily invited a friend of mine (who was a strapping young lad at the time) into the back of a van to "execute some 1802 instructions".
- Stratoscope 6y agoAh yes, I knew John well in those days. Not nearly as well as he wanted to know me! We used to drive around in his VW microbus finding interesting payphones. Then when he was learning to program, I visited him once in a while at his place in Berkeley to help him with his code. My motivation was that he usually had some decent weed. Then one time he asked if I wanted to "work out". That lasted about two minutes until I found out what he really meant. Many years later, I ran into John at the Homebrew Reunion. He didn't recognize me at first, so I reintroduced myself and mentioned how we used to hang out and write code. His eyes lit up and he asked, "did we work out?" https://www.flickr.com/photos/geary/10861963196/ https://www.flickr.com/photos/geary/10861963196/
- cjak 6y agoI just finished a project that introduced features for both signal injection and signal extraction. So now we can enjoy both SIN and SEX, sometimes at the same time.
- Zuider 6y agoDon't forget the addressing modes. The M6809 had double indirection even for two memory addresses!