
Motorola M68000 Family Programmer’s Reference Manual (1992) [pdf] - doener
http://cache.nxp.com/docs/en/reference-manual/M68000PM.pdf
======
sofaofthedamned
68k was the easiest 'language' I ever learned. You had the reference manual,
the instruction timings, no middleware, it was awesome and I made my future
career from the age of 12 by writing Amiga / ST stuff.

Best thing is - it was me against the machine. If anybody did something that
moved more sprites than I did, or did better parallax, it was because they
were better than I. No driver incompatibility to blame. I loved programming in
1984, it made me tolerate less shit and produce better code than people who
were less fortunate to be born later.

I miss those days :(

~~~
freedomben
I feel ya. The 68k days were glorious indeed. I'm sure things weren't _really_
as good as I remember them, but man the nostalgia pull is real. I agree with
the Raspberry Pi people, it's a lot harder to hack on stuff than it used to
be.

~~~
mrguyorama
I completely missed the heyday of microprocessor programming, but I
wholeheartedly disagree that hacking on things is harder than it used to be.
TI-84 calculators are $100 and let you write Z80 assembly, 68k microprocessors
are available for less than $10 from any number of sources, easily available
documentation and 30+ years of experience to draw on, freely available plans
for whole systems so that you don't actually have to figure anything out
yourself, or you can bypass all that and build your own processor in a circuit
simulator, like I did, or learn HDL and buy a cheap FPGA and run it for real,
or use something like python to control your parallel port with single lines
of code connected to a webserver if you don't mind being silly.

Heck, if I want to, I can even massively hack things, write kernel drivers for
linux OR windows, do basically whatever I want. Some of them are harder than
others, and some are more intended than others, and some require more time
than others, but the world of hacking is still one of possibility. Pretty much
the only locked down systems are smartphones, which sucks, but I just bought a
raspberry Pi zero W for 10 dollars, which is incredible compared to the Basic
Stamp 2 micro controller that cost $120 just a decade ago.

Literally the only difficult (at least IMO) thing for hacking whatever you
want is analog circuits. I still massively struggle with that.

~~~
freedomben
Good points. When I think of hackability tho, I think about the devices and
"toys" that I already have. Back in the day you just hacked on what you
already had. Also, most of the time you were a kid or teenager that couldn't
even afford the 10 bucks for the pi, so unless your parents bought one, you
were out of luck. I had to take apart my dad's VCR and computers and stuff in
order to learn.

But for an older person, you make some great points.

------
jeffbarr
Back in the 1980's, I took one of these chips and ran four copies of the same
OS on it, using some virtual memory and driver magic. The full story can be
found at [http://jeff-barr.com/2008/01/08/inmsx-running-4-copies-of-
an...](http://jeff-barr.com/2008/01/08/inmsx-running-4-copies-of-an-operating-
system-at-once/) .

~~~
gameshot911
Wow dude, you're amazing! How are you able to dig so far into (extremely
technical, difficult!) uncharted territory without getting diverted one way or
another - frustration, "too hard", give up, etc.? ESPECIALLY since you did it
all without the galaxies of information and well-tred paths available today!

~~~
spc476
There was no Internet to distract him.

------
alxlaz
I think one of the greatest things about the M68K _today_ is that it's a
relatively powerful processor that's relatively straightforward to program
_and_ it's pretty easy to design hardware that uses it.

A single board computer with the m68k is still small enough that you can
comprehend the schematics and build it at home (e.g.
[http://www.kswichit.com/68k/68k.html](http://www.kswichit.com/68k/68k.html)
), and it's a very valuable learning experience.

~~~
juliangoldsmith
Are new M68K chips still produced? I looked a while ago, but couldn't find
any.

~~~
duskwuff
Barely. The 68SEC000 is still in production, but is NRND.

~~~
0xcde4c3db
What about the second-source vendors? Historically I know there were Hitachi
("HD" prefix), Toshiba ("TMP" prefix), and Signetics ("SN" prefix) parts. At
one point I saw a modern-looking Atmel data sheet for a TS68C000
(Thomson/STMicro license?), but I don't know how recent that actually was.

The Hitachi line, at least, seems to be explicitly EOL by Renesas. I'm not
familiar enough with the other vendors to know who might have picked up their
licenses.

~~~
duskwuff
I suspect those are all gone too. TS68C000 went EOL in 2010 -- it was produced
by Thomson-CSF, which was acquired by e2v.

One interesting avenue to explore might be the Sega Genesis. It's still being
produced in Brazil, believe it or not -- and there must be some sort of
68000-compatible processor at the core of those.

------
pskisf
I still program the 68K today in K&R C. I recently released a Dropbox client
for Tandy XENIX.

[http://pski.net/trs-box-xenix/](http://pski.net/trs-box-xenix/)

------
protomyth
Back in the 80's, I wrote a letter to their documentation department asking
how much certain manuals were (I was a fan). I got a box of manuals in the
mail instead of a price list. They sent the references for both the 68000 and
6809. It was funny when I got to college and one of the EE courses involved
programming of a 6809. Its a true shame their isn't a 64-bit 68000 as it is
such a nicer processor than the x86.

~~~
puzzle
They never charged for manuals, as far as I know. I have a whole bookshelf of
68K and PPC books, datasheets and references.

------
eludwig
The 68K was such a glorious processor to program, especially after coming from
the 6502. Hardware multiply and divide? Sign me up! :D

The assembly code looked like poetry.

~~~
hansjorg
M68k assembler was so straightforward and beautiful. Easy to read and easy to
write. Too bad that the monstrous x86 won out.

~~~
eludwig
Totally agreed. The first time I saw x86 assembler I almost cried.

~~~
phkahler
My first computer had an Intel 8080 so when I got a 6502 it seemed so
backward. How could you do anything with that? Then when the 68000 came along
it was wonderful and put both the others to shame. I never understood why IBM
didn't use it. I still have a hard copy of a preprint of the 68K manual dated
1979.

~~~
Zardoz84
From
[http://yarchive.net/comp/ibm_pc_8088.html](http://yarchive.net/comp/ibm_pc_8088.html)

> 68000 was carefully considered. "AN excellent architecture chip, it has
> proven to be a worthy competitor to the Intel-based architecture." there wer
> four major concerns:

> 1) 16 bit data path would require more bus buffers, therefore a more
> expensive system board.

> 2) more memory chips for a minimum configuration.

> 3) while it had a performance advantage, the 68000 was not as memory
> efficient.

> 4) Companion and support chips not as well covered as Intel.o

> He also felt the the 68000 didn't have as good software and support tools,
> and the similar register model allowed the porting of 8080 tools to the
> 8086/8088.

> "In summary the 8088 was selected because it allowed the lowest cost
> implementation of an architecture that provided a migration path to a larger
> address space and higher performance implementations. Because it was a
> unique choice relative to competitive system implementations, IBM could be
> viewed as a leader, rather than a follower. It had a feasible software
> migration path that allowed access to the large base of existing 8080
> software. The 8088 was a comfortable solution for IBM. Was it the best
> processor architecture available at the time? Probably not, but history
> seems to have been kind to the decision."

I don't remember where I read about it, but I remember reading about that IBM
ditched the 68008 (8 data bit bus version, like the 8088) because some problem
with it... availability of it, perhaps.

------
paulcole
Did anyone else get into ASM coding through the TI-89 (M68K) and TI-83 (Z80)?
I had so much fun drawing sprites on graph paper and working on random
projects and games I was thinking about.

Sharing them with my friends through the cable that went into the headphone
jacks. The fun of seeing somebody at my school I didn't really know getting a
kick out of something I made.

~~~
hermitdev
I did ASM on the TI-83 when I was in high school. Self-taught from the
reference manual. Didn't know how to properly use the stack or write functions
in ASM at the time...my code was a mess! Still, was quite a lot of fun with
the only danger of having to yank the batteries if you messed up.

By the time I got a TI-89 around 1999, I was in college and just didn't have
the time to do anything substantive with programming it.

I'd dust it off, but mine is old enough to just have the I/O port, and don't
know that I have any functioning computers with a parallel or serial port for
the old TI Link.

~~~
duskwuff
There are USB versions of the TI-Link.

Alternatively, a while ago I used Emscripten to build an emulator for the TI
Voyage 200 (a late revision of the TI-92). There's some minor glitches, but
it's mostly functional:

[https://woofle.net/v200/](https://woofle.net/v200/)

------
bobpappas
I wrote this game in the 80's for the Mac in assembler. Loved the 68000!
[https://www.macintoshrepository.org/3331-macgolf-
classic](https://www.macintoshrepository.org/3331-macgolf-classic)

Wrote some others too:
[https://www.macintoshrepository.org/3732-macracquetball](https://www.macintoshrepository.org/3732-macracquetball)
[https://www.macintoshrepository.org/3384-road-
racer](https://www.macintoshrepository.org/3384-road-racer)

~~~
eludwig
Oh my god!! I loved MacGolf!! I think that back in the day I used TMON to
break the copy protection scheme (for personal use only, of course!) so many
good memories. Thanks so much.

------
Fjolsvith
In the Air Force, I went to school to learn how to repair and maintain an 18
bit Hewitt-Rand mainframe computer in 1988. It was a four month course taught
at Tyndall AFB near Panama City Beach, Florida.

At the time, I was an Amiga fan, and I had this manual. I was totally blown
away at how nearly identical the architecture of the M68000 was compared to
that mainframe. Imagine my thinking that my Amiga 500 had the equivalent of a
room-sized mainframe in that chip!

------
jimjimjim
An elegant weapon for a more civilized age.

------
jonsen
Notice the high quality of documentation. Motorolas were some of the best as I
remember it.

~~~
puzzle
It was definitely among the very best, but more than 15 years ago I found an
error in the E500/Book E reference manual that repeated itself for more than
200 pages. It only was relevant to you if you cared about the actual bit
encoding of SPE instructions. Plus there was a random reference to someone
named Gary that, obviously, wasn't meant to be there.

Motorola's PowerPC support hotline acknowledged the problem on the same day
and published a new version of the manual by the end of the week or the next
one. Of course they did, because that's how great they were.

~~~
SmellyGeekBoy
But what became of Gary?

~~~
puzzle
They never acknowledged Gary, but removed him anyway. The original said

"Scalar floating-point instructions operate on single 32-bit operands that
reside in the lower 32-bits of the GPRs. These instructions are considered a
proper subset of the SPE APU; this subset is referred to as the SPFPU now
called the EFPU Gary cares only that it have embedded in it somewhere."

(more recent e500 chips considered the scalar instructions to be in a separate
APU)

------
mistrial9
Good times ... EXCEPT ' you cannot move “word” or “long-word” sized data in
and out of memory, if the address is an odd number' .. in other words, a hard
fault.. This mis-feature can come up a lot, and was fixed in later CPUs.

[http://mrjester.hapisan.com/04_MC68/Sect01Part06/Index.html](http://mrjester.hapisan.com/04_MC68/Sect01Part06/Index.html)

~~~
puzzle
Well, purists would have told you that you had to align your data. Yes, later
chips did support misaligned accesses, but that came at a cost: extra bus
cycles.

~~~
phkahler
And now compilers will make sure your data structures are aligned. Adding
circuitry and compromising performance for lazy programmers is a bad idea.
This is one thing RISC-V has carried over and I'm not sure they have justified
the decision to do so.

~~~
userbinator
In some cases, packing data structures with no alignment is more important
because it means more data fits in the cache, and cache misses are extremely
slow in comparison.

Modern x86 is mostly insensitive to data alignment, since it fetches
internally in cacheline-sized blocks (I believe it's 64 bytes) and a very wide
barrel shifter is used to access the desired bytes. There's a tiny (single-
digit cycles) extra time when the element straddles two cachelines (assuming
both lines are in cache)

------
starchild_3001
Brings me back in memory lane, where I was a 13-14 yrs old middle-schooler
trying to read this extremely thick manual with no or little background in
logic design, CPUs etc. Well I could still program, or at the very least hack
it to show some graphics, implement sinus scroll from scratch etc :)

------
keithnz
I started with the 6502, but my second computer was an Atari STE and did a lot
of 68k programming. It was great. Then I discovered the book "The Art of
Electronics" as a late teen. It had a whole bunch on the 68008 ( which is gone
from the current edition ) which was nice for little embedded projects as it
interfacedd with the 8 bit world.

[https://en.wikipedia.org/wiki/Motorola_68008](https://en.wikipedia.org/wiki/Motorola_68008)

later on I got to do some work on a 68030 series micro. That was pretty nice
also. All assembly based.

------
TheMagicHorsey
What is the modern equivalent that kids can use today? Arduino?

~~~
watersb
I am not qualified to answer, so here I go:

If in the USA: Hack a TI-89 calculator. They are still 68K-based, are
unfortunately inescapable bricks tied to mandated Maths curriculum, and have
an active hacking community.

I re-learned M68K programming via the Palm Pilot, which has a fun SDK clearly
inspired by the Classic Macintosh.

I would say that ARM programming can be as fun as 68K, so perhaps a Raspberry
Pi to start. You can get closer to the glory days with ARM-M Arduino-like toys
such as the Teensy.

I haven’t done any assembly-level Arduino programming, so I don’t know what
that feels like versus 68K. Lots of microcontrollers grew upwards out of the
then-popular 8051, which does not feel the same to me.

I got started on the Motorola 6809 CPU and the TRS-80 Color Computer. You
could almost call it an 8-bit precursor to the M68K, it is limited but very
nice design.

~~~
pjmlp
Yep, here is a possible starting point with ARM Assembly on the PI.

[https://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/os/i...](https://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/os/introduction.html)

------
TomMasz
Oh, the memories. Being able to predict the exact instructions the compiler
would generate. Patching in memory using NOP instructions. Actually being able
to write assembler code. Unsegmented memory. It has always disappointed me
that Motorola didn't do better in microprocessors but that's water under the
bridge.

------
phendrenad2
I read old processor manuals for fun as a kid. 68k, x86, the rare ARM or SPARC
book...

------
indescions_2018
Thanks for posting. Well before my time. But powered some legendary video game
consoles such as SNK Neo-Geo and Sega 16.

[http://www.sega-16.com/](http://www.sega-16.com/)

------
rjsw
[turns to bookshelf] My copy is dated 1984.

~~~
gtufano
I have an MC68000 User's Manual edited by Prentice-Hall with the HP logo (and
an HP 9800 Computer Systems sub-title) that says December 1981.

~~~
aoki
mine as well (albeit 4th edition, 1984). which is sort of weird because i
never saw or touched an M68k HP; i only ever referred to it when debugging
stripped binaries on Sun 3s.

