If you appreciate the work done within the wiki, please consider supporting The Cutting Room Floor on Patreon. Thanks for all your support!

User:Chromaryu/68KSnippet

From The Cutting Room Floor
Jump to navigation Jump to search
This cactus is UNDER CONSTRUCTION
This article is a work in progress.
...Well, all the articles here are, in a way. But this one moreso, and the article may contain incomplete information and editor's notes.
Hmmm...
To do:
Add more of these.

68kSnippet is Chromaryu's subpage.

This page covers 68000 assembly instructions.

on this snippet,

  • $FFFF0000 and below 64kB is considered as RAM region.
  • Dx means any of Data Registers
  • Ax means any of Address Registers
  • Rx = Dx or Ax.

Registers

68000 have 8 data registers, 8 address registers; corresponding to d0-7, a0-7.

specially, a7 is considered as SP(Stack Pointer).

PC register is 24bit.

Addressing

there's l,w,b, corresponds to Longword, Word, Byte.

Longword means 32bit, word is 16bit, byte is 8bit.

addressing can be defined <Mnemonics>.<addressingMode>

Instruction set

Math instructions

Mnemonics Arguments Attributes Operation
ADD Dn,Dn Size(lwb) Source+Dest->Dest
SUB Dn,Dn Size(lwb) Dest-Source->Dest
SWAP Dn Size(w) Reg[31:16] <-> Reg [15:0]
EXG Rx,Rx Size(l) Rx[0] <-> Rx[1]
CLR Rx Size(lwb) 0->Dest