16 Comments

Wow, what a highly debatable subject!

I think you will always have a soft spot for what you grew up with, and whilst I’ve done my fair share of Z80 and 8086 assembly, I’d always prefer my first 8 and 16 bit loves… 6502 and 68000.

But hey, I still love Pascal so what would I know!

Expand full comment

I love the 6502 too! I actually wrote a post 65 Reasons to Celebrate the 6502 [1] a couple of years ago. It took a quirky and unique approach and that's why it's hard to recommend for anyone starting out. The 68k is great too and Pascal is awesome!

[1] https://thechipletter.substack.com/p/65-reasons-to-celebrate-the-6502

Expand full comment

That is a great article that I somehow missed. The 6502 just seems so simple and elegant despite its quirks… dare I say RISC like?

Expand full comment

6502 is as far from RISC as they come. RISC is, most of all, a load/store architecture. Where memory accesses are separated from other operations. While 6502 is the opposite: first 256 bytes act as registers.

It's simple enough, yes, but very far removed from load/store approach.

Expand full comment

Debatable…

A RISC-based CPU (Reduced Instruction Set Computer) is a type of microprocessor architecture that uses a small, highly optimized set of instructions. This design philosophy focuses on executing a large number of simple instructions rather than a smaller number of complex ones, leading to higher performance and efficiency, especially in tasks that can be broken down into smaller operations.

Expand full comment

I don't know what to debate there, really. The story of RISC started from IBM 801 and was always about the idea of separation of memory accesses from other operations and performing all operations on registers and not touching memory. Of course it's possible to ignore everything but some words on the tin… and tell that some words from RISC definition match the design philosophy of 6502… but that would like saying that Boeing-747 is just an off-road car. Hey, it has some wheels, it can be driven around… why is it not a car?

Expand full comment

I did say… dare I say RISC like. If you don’t get it I can’t help you.

Steve Furber and Sophie Wilson of Acorn Computers were both fans of the 6502. So when they came to design their own microprocessor they took some of the ideas from the 6502 - especially its simplicity, economy and high memory bandwidth and applied them in the creation of the ARM 1

Expand full comment

Just recently retired after programming solely in commercial settings for over 50 years, more than half as a compiler writer for DEC, Apollo Computer, HP, IBM and Mathworks. Of course I started in assembly. There was really nothing else available for building commercial applications. I cut my teeth on PDP-11 assembly, learning from instruction set manauls that DEC handed out for free. Though not perfectly uniform (in particular, no byte add nor byte subtract), the regularity and orthogonality of the architectural features made learning a breeze.

To this day, if I were asked to teach assembly language concepts, the PDP-11 would be my very first choice.

In my case, that choice is not based on any early love. Were I truly to follow my heart, I could pitch the ISP of Apollo Computer's DN10000, which I designed (patent US5051885A) and for which I led the compiler team. After HP bought Apollo, we retargetted our compiler's backend to generate code for PA-RISC and Intel i860 (though HP never shipped those products). Along the way, I did persuade HP to include multiple DN10000 instruction set features into the PA93, the 64-bit extension of PA-RISC.

In addition to the machines mentioned above, I have deep exposure to a bewildering collection of assembly languages . I have shipped commercial assembly code for DEC PDP-8, VAX, and Alpha, Motorola 68000 and 68020, IBM PowerPC (Motorola MPC5xx, IBM/AMCC 440), MIPS32, and Intel 8080 and 80x86, . I further learned the assembly languages well enough to debug code on the DEC PDP-6 and -10, the PDP-9 and -15, the IBM 1130, many ARM variants, and even MIT's one-off PCP-1x during the hacker heyday :-).

Still, I stand by my position that the PDP-11 assembly language is a consummate teaching vehicle.

Getting to the point of being able to read and debug disassembled real code requires develing into the arcana of calling conventions. Not for the feint of heart!

Expand full comment

Thanks so much for sharing, John. I'd love to do a post on the DN10000 and PRISM but documentation seems to be thin on the ground. Are there any good sources out there?

Expand full comment

I co-wrote an IBM/370 mainframe Security System product in 1981, all in assembler. Sold it in 1985 and retired, the product is still in operation around the world and is owned by Broadcom today.

Expand full comment

That's fantastic. I remember one of the key systems at the company where I worked in the early 2000s dated from around the same time and was written in 370 assembly. Memory was so scarce when it was originally written that they had to squeeze every last byte out using assembly - COBOL just didn't cut it!

Out of interest do you have a favorite 370 assembly reference document from that era?

Expand full comment

I've shipped 100% assembly programs commercially for the 65816 and 68000, and worked with 32-bit x86, Hitachi SH, MIPS, "classic" ARM, and PowerPC. I still prefer 65xx and 680x0, which feel like they were made for humans to program.

Like everyone these days I live 5000 feet above the hardware in C++17 and Javascript and things of that nature, but my Apple IIGS still works for when I want to touch grass, err, silicon.

Expand full comment

Completely agree that modern ISAs feel like they weren't made for humans to program. Even the RV32I feels a bit unfriendly. I think 68k would win the human friendly contest - or maybe ARM 1 as Sophie Wilson created it for her own use.

Expand full comment

In high school (Sacramento, 1970s) a guy who was a field service agent in the 50s and 60s built out a high school computer lab, with donated gear from his old customers. We had an early 60s drum-based computer! It had an assembler, but it ran all day and the computer overheated, so... you had to enter machine code through a very ergonomic switch setup. I saw down at a PDP-11 and was appalled at how clunky the switches were.

I would recommend starting at the bottom, and learning a microcode. After all, this is how SIMD machine code works, and GPUs are the rage. Then learn a normal assembler.

Ok, my assembler on the job story: my first computer-biz job was in the early 80s at "Fortune Systems". We made a 68000-based "small business computer" and became responsible for many of the weird caveats you find in VC funding offers. I got the motherboard boot ROM. The first few instructions were in assembler: "load a number into an address, jump forward 0x400000, fiddle with two registers, jump into a C subroutine".

Explanation: "program the memory-mapper unit, jump forward from position 0x8 to position 0x400008 so that now we're running through the memory-mapper, call the outer wrapper of the C-based boot code". From then on, everything ran through the memory-mapper.

Expand full comment

That's awesome. Thanks for sharing. Really tempted to do a post on microcode!

Expand full comment