A small tutorial for AmigaOS/68k
This small tutorial is for all those who are used to integrated
development environments like DevPac or AsmOne and want to create
Amiga 68k executables from a single source without reading and
understanding all of the vasm documentation.
Basically you will need two programs:
- A text editor of your choice to write and save the source text.
- The vasm M68k assembler with Motorola syntax, vasmm68k_mot.
Assemble the source text test.asm, and create an executable
file test in AmigaDos hunk format without debug symbols:
vasmm68k_mot -Fhunkexe -o test -nosym test.asm
Building an executable from several modules
When building an executable from several assembler sources, you
need an AmigaOS linker like vlink to link the
object modules into the final executable.
Assemble your sources:
vasmm68k_mot -Fhunk -o test1.o test1.asm
vasmm68k_mot -Fhunk -o test2.o test2.asm
Link the objects into the final executable test
while stripping all symbol information from it:
vlink -bamigahunk -o test -s test1.o test2.o
The vasmm68k_mot assembler is quite Devpac compatible in its default
setting, but in some cases you may need even stricter compatibility.
Specify the -devpac option for:
- Automatic alignment of all data definitions with a size greater
than a byte.
- Do not use NOP instructions when aligning code.
- No code optimizations are done by default. You have to enable
those you need with the appropriate Devpac OPT directives.
- Accept up to 36 macro arguments (including \a .. \z)
instead of only 10.
- Shift-right operations in an expression are unsigned (32 bits).
- Predefine the offset symbols __RS, __SO and
__FO with 0.
- Define the symbols __G2 and __LK.
Allow dots within identifiers.
- Warn about any optimization being done.
- Do not warn about a size extension for an unsized opcode.
- Do not write any symbol information into the output file.