vasm

A portable and retargetable assembler.
About vasm
Last release source
Daily source snapshot
Tagged source archives
Last release binaries
Daily snapshot binaries
Compilation notes
A small tutorial
vasm docs (html)
vasm docs (pdf)
Volker's vasm page
vbcc/Amiga home page

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 multiple object modules

When building an executable from multiple assembler sources, you need an AmigaOS linker like vlink to link the object modules into the final executable.

Assemble your sources into object files:

  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

Devpac compatibility

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 debug symbol information into the output file.

$Id: index.php,v 1.16 2023/09/30 11:49:53 frank Exp $