dc.b 'Hello world!', 4, %10, $F, @10, 'a', some_labelDirectives
dc
b, w, lds
b, w, lReserves the given number of elements in memory without initializing them. .b, .w and .l select 1, 2 or 4 bytes per element. The default is .w. Word and long regions start at an even address.
ds.l 100dcb
b, w, lStores the given number of copies of the second operand in memory. .b, .w and .l select 1, 2 or 4 bytes per copy. The default is .w. For example, dcb.b 50, 1 writes fifty bytes, each containing 1.
dcb.b 50, 1org
Sets the address where the following instructions or data are assembled. For example, org $2000 places the next item at $2000. Within a section, it changes that section’s location counter.
org $1000equ
Defines a constant expression. The symbol cannot be redefined later.
name equ 10set
Defines a symbol’s value, which later set lines may replace. References use its most recent definition in assembly order, including across included files. Define it before using it in its own next value: count set 0 followed by count set count+1 makes count equal to 1.
count set 0
count set count+1end
Stops assembly and optionally selects the program entry point. Code after it is ignored.
end STARTreg
Names a register list for use by movem.
saved reg d0-d3/a0-a2fail
Raises an assembly error with the rest of the line as its message.
fail Expected an argumentsimhalt
Pauses execution until Run or Step resumes it at the next instruction. It assembles as $FFFF $FFFF, the two words EASy68K recognizes as a pause. Put it before data or after a finished example to keep execution from continuing into the following bytes. To end execution instead, use simulator task 9.
simhaltsection
Selects one of sixteen location counters, numbered 0 through 15. Assembly starts in section 0 at $1000. The other sections start at zero, so use org to give them suitable addresses. Returning to a section resumes where its previous item ended. All sections share the same memory.
For example, section 1 followed by org $4000 and dc.l 10 places a long at $4000. Switch to section 0 to continue its code, then use section 1 again to place the next item at $4004.
section 1offset
Assigns offsets to labels without emitting bytes, starting at the given value. Data directives advance this offset so you can describe a structure’s fields. org ends the region and resumes placing bytes. org * restores the address that was current before the region.
offset 0
kind: ds.w 1 ; offset 0
value: ds.l 1 ; offset 2
length: ds.b 0 ; total size: 6 bytes
org *1
2
3
4
5
With a0 pointing to a structure, move.l value(a0), d0 reads its long field.
offset 0include
Assembles another text file at this point. The path is relative to the including file, then the top folder.
include 'lib/io.x68'incbin
Copies the exact bytes of another file into memory at this point.
incbin 'images/sprite.bin'memory
Applies an access rule to an inclusive memory range. For example, memory rom $8000,$8FFF covers every address from $8000 through $8FFF.
rom: code and data may be read. Program writes are ignored.read: code and data may be read. A program write causes a bus error.protected: only supervisor code may read, write or execute here. Any access from user mode causes a bus error.invalid: every program access causes a bus error.
A bus error raises exception vector 2, at $8 with the default vector table. Without a handler, the program ends and the Log identifies the refused access. See writing an exception handler.
There can be one range of each kind. A second memory directive for the same kind replaces its previous range. These rules apply to the running program. The debugger can still inspect and change the bytes, and the memory view displays the ranges as regions.
memory rom $8000,$8FFFopt
Selects the processor and optional assembler features for the whole assembled program. Without a processor option, the target is the 68000. Write opt p=68010 or opt p=68020 before any code or data to enable that processor’s instructions and addressing modes. The choice also applies to included files. Included files do not have independent processor settings.
The editor supports the 68010 instruction set and the 68020 instruction set except callm and rtm. The 68020 additions include scaled indexes and memory indirect addressing, long branches, long multiplication and division, cas, chk2, conditional traps, and bit fields.
opt bit enables bit-field instructions for a 68000 or 68010 program, as in EASy68K. Its addressing modes remain those of the chosen processor. A 68020 program already has bit fields. Write this option before any code or data too.
EASy68K’s listing options cre, mex, sex, war and cex, including their no forms, are accepted and have no effect.
opt p=68020list
Accepted for compatibility and ignored.
listnolist
Accepted for compatibility and ignored.
nolistpage
Accepted for compatibility and ignored.
page