drj,
@drj@typo.social avatar

Welcome to #MOVember, one asm MOV instruction each day.

The Motorola MC68000 has a BEAST of a MOV instruction.
Official assembler mnemonic: MOVE. Refreshingly clear!

You could move to and from registers and/or memory. 8-, 16-, 32- data sizes. Post increment, predecrement. Including memory-to-memory moves (Ferris Bueller soundtrack voice: Oh Yeah).

*d++ = *s++ is a single instruction in 68000.

Officially destination on the right: MOVE A7,D0 copies the A7 register to D0

Please 🔁

#68k

llamasoft_ox,
@llamasoft_ox@toot.wales avatar

@drj at one point I was working on two things, one 68k and one x86, and the mov instructions were the fucking opposite way round with regard to source and destination, proper bastard that was! haha

weaselx86,
@weaselx86@mastodon.social avatar

@llamasoft_ox @drj

Some x86 assemblers used SRC,DST syntax rather than DST,SRC.

TimWardCam,
@TimWardCam@c.im avatar

@drj It's an awful long time ago that I wrote any 68000 assembler - this was during the development of the QL which actually used a 68008.

One booby trap I seem to recall was to do with moving more than one byte at a time via an A register used as a pointer and containing an odd number. Didn't work at all, but I have a vague feeling that this got "fixed" (at the cost of additional bus cycles) in later processors?

f4grx,
@f4grx@chaos.social avatar

@TimWardCam @drj I am not sure any 68k supports unaligned word acesses. that is probably an address error exception.

TimWardCam,
@TimWardCam@c.im avatar

@f4grx @drj It was then, but I have a vague feeling that the 68010 or 20 allowed odd addresses. At a performance cost.

clacke,

> In this IBM article from 2005, it is covered how the Motorola m68k, MIPS and PowerPC CPUs of that era handled unaligned access. The interesting thing to note here is that until the 68020, unaligned access would always throw a bus error. MIPS CPUs didn’t bother with unaligned access in the name of speed, and PowerPC took a hybrid approach, with 32-bit unaligned access allowed, but 64-bit (floating point) unaligned access resulting a bus error.

hackaday.com/2022/05/10/data-a…

@TimWardCam @f4grx @drj

amackie,

@drj Not surprised. I learned assembler on the 68k, and it was a (relative) joy to write for.

hyc,
@hyc@mastodon.social avatar

@amackie @drj pretty straightforward to "compile" C to m68k asm by hand, too.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • mdbf
  • tacticalgear
  • magazineikmin
  • thenastyranch
  • rosin
  • everett
  • Youngstown
  • khanakhh
  • slotface
  • ngwrru68w68
  • kavyap
  • cisconetworking
  • InstantRegret
  • megavids
  • osvaldo12
  • GTA5RPClips
  • ethstaker
  • tester
  • Durango
  • normalnudes
  • anitta
  • modclub
  • cubers
  • Leos
  • provamag3
  • JUstTest
  • lostlight
  • All magazines