Document fait avec Nvu Document made with Nvu

Technical pages
Assemblers 68000 and 68030



The assembler is a compiler which allows to write a program by using the specific instructions of the microprocessor being of use of heart to the computer. The assembler is indispensable to the writing of the basic instructions of high-level languages (FORTH, Pascal, C, ...) which are so independen from the used platform themselves. To speak more technical, high-level languages are portable while the assembler is not it (unless realize a simulation software).

The purpose of this page is not to list all the instructions of processors 68000 and 68030 or to give a manual of it.

The documentation of the builder is available on

On the other hand, the contents of this page will allow developers the most warned to realize their own programs in assembler in the environment of my system.



Allows to initialize again the labels table


Assembly of the text which follows this instruction until the directive " END "


Allows to remove the instructions set dedicated to the assembler from the vocabulary.


The assembler of my system is a real assembler 2 passes managing a labels table. As indicated in the corresponding column, it contains only 3 instructions FORTH:

  • RAZ_ASSEMBLEUR erases the labels table. This disappearance is automatically realized in the software installation. It is not necessary to omit the execution of this instruction at the beginning of the code source because, in case of assembly again, he will avoid the appearance of the message " already declared Label ".
  • ASSEMBLER crosses the interpreter FORTH in assembler. From this instruction, the syntax of the following lines has to follow that of the assembler until the appearance of the directive " END " which indicates to the assembler to return to mode interpretation FORTH at the conclusion of the second pass.
  • FORGET_ASSEMBLEUR frees memory occupied by the assembler when this one is not useful any more. The space busy report is of 32768 bytes for 68000 and 65536 bytes for the 68030. 3 instruction FORTH bound to the assembler will disappear of the vocabulary at the same time as the liberation of the memory space.

Labels have necessarily to begin with a capital. The following characters can be capitals, numbers or character "_". Any label of has to begin with the same letters as the registers of processors.

  • 68000 registers: D0, D1, D2, D3, D4, D5, D6, D7, A0, A1, A2, A3, A4, A5, A6, A7 or SP or USP, PC, SR, CCR.
  • 68030 supplementary registers: ISP, MSP, VBR, SFC, DFC, CACR, CAAR, TC, CRP, SRP, TT0, TT1, MMUSR.

The registers of the MC68030 (68000 for the mini system) are used in the following way:

  • D7 constitutes the summit of the pile of data,
  • D6 , D5 and D4 are reserved for intermediate calculations,
  • D3 , D2 , D1 and D0 are free,
  • A7 or SP constitutes the pointer of the return stack,
  • A6 constitutes the pointer of the data stack (he points so the 2-nd element),
  • A4 and A5 are reserved for intermediate calculations,
  • A3 , A2 , A1 and A0 are free.

Instructions must be written in capitals. Syntax is the same than that of the MOTOROLA. The modes of addressings are the following ones:

  • 68000 modes of addressings: Dn; An; (An); (An)+; -(An); (d16,An); (d8,An,Xn); Abs.W; Abs.L; (d16,PC); (d8,PC,Xn); Imm.
  • 68030 supplements: (bd,An,Xn); ([bd,An,Xn],od); ([bd,An],Xn,od); (bd,PC,Xn); (bd,PC,Xn); ([bd,PC,Xn],od).

For the 68030, instructions bound to coprocessors are not implemented.


To illustrate this presentation, nothing is worth a good example. This one is available under shape of file text: sqrt.txt.

It is about a program allowing the origin of the square root of a positive 32 bits integer.