|
|
vasm is a portable and retargetable assembler to create
linkable objects in various formats or absolute code.
Multiple CPU-, syntax and output-modules can be selected.
Many common directives/pseudo-opcodes are supported
(depending on the syntax module) as well as CPU-specific
extensions.
The assembler supports optimizations
(e.g. choosing the shortest possible branch instruction or
addressing mode) and relaxations (e.g. converting a branch to an
absolute jump when necessary).
Most syntax modules support macros, include directives,
repetitions, conditional assembly and local symbols.
|
Currently the following CPUs are officially supported by vasm:
- M680x0 family (including M6888x, M68851 and CPU32)
- ColdFire family (all models of V2, V3, V4, V4e)
- 80x86 family (IA32 8/16/32 bit, using MIT-syntax)
- PowerPC (all models)
- ARM (most models, including THUMB mode)
- Z80 family (Z80, 8080, GBZ80, 64180, RCM2/3/4k)
- C16x/ST10
- 6502
|
These syntax flavours are supported:
- Standard MIT (GNU-as style) syntax
- Motorola/Freescale 68k syntax (Devpac compatible)
- Old 8-bit style syntax
|
Supported output file formats:
- ELF (M68k, PowerPC, i386 and ARM)
- a.out (M68k and i386)
- Amiga hunk format (M68k)
- TOS executable format (M68k)
- EHF extended hunk format (PowerPC)
- Raw, binary output (all)
- VOBJ proprietary versatile object format (all)
- Test, debugging output (all)
|
02-Aug-2010: vasm 1.4f.
- The parser accepts "\n", "\r\n", "\n\r" and a single "\r" as line-endings.
- Avoid infinite loop when a source line is too long.
- Constant block directives (e.g. DCB in mot-syntax) allow any kind of expression for the fill-value now.
- Fixed constant block directives with a size > 8 bytes (e.g. DCB.X).
- Quit with an error when a section needs too many passes to resolve. This happens when the user does something stupid like start: .space end-start end:
- Ignore rest of the line after an end-macro or end-repetition directive.
- Support for the Seka/AsmOne ~ binary-operator, which is a synonym for ^ (exclusive-or).
- m68k: Also accept ([An,bd]...) instead of ([bd,An]...) for Devpac/AsmOne compatibility.
- m68k: Recognize linea, line_a, linef and line_f mnemonics.
- m68k: Make BASEREG directive only take effect when a program label was referenced together with a register (i.e. not with (4,A5)).
- mot-syntax: Allow up to 35 macro parameters in Devpac compatibility mode.
- mot-syntax: Accept macro-names starting with a dot. But even then they are still of global scope.
- mot-syntax: RORG directive.
- mot-syntax: Support for PRINTT and PRINTV from AsmOne and ECHO from PhxAss.
- mot-syntax: DR directive from AsmOne to build PC-relative data tables.
- mot-syntax: New directives: ODD, PAGE, NOPAGE, IMAGE (same as INCBIN).
- mot-syntax: Directives ENTRY, EXTRN and GLOBAL are recognized and are identical to XDEF.
- mot-syntax: Some directives without any function just for compatbility: JUMPERR, MASK2, LLEN, SPC.
|
09-Jun-2010: vasm 1.4e.
- m68k: Fixed some problems with fmovem when using register list symbols.
- m68k: fsmove and fdmove were missing the coprocessor ID 1 in their opcodes.
- m68k: fsmove/fsmove FPn,FPm addressing mode was missing.
- m68k: Fixed moves <ea>,Rn.
- std-syntax: n$ is recognized as local symbol.
|
13-Dec-2009: vasm 1.4d.
- A macro parameter containing blanks or commas may be enclosed between < and > to be treated as a single parameter (Devpac).
- Support for \?n (length of parameter n) and \# (number of parameters) in macros (Devpac).
- No longer forget macro parameters in a repetition-block within a macro.
- Empty strings in a data definition directive (e.g. .byte "") are ignored instead of generating a 0-byte.
- m68k: Also accept swapped displacement and base-register in indexed addressing modes, e.g.: (An,d,Rn). Devpac/AsmOne compatibility.
- m68k: Fixed "pmove mmusr" (68030).
- m68k: BRA.B *+2 is translated into a NOP when no optimization is allowed.
- mot-syntax: The blank-separated comment field after DC.B "string" was not recognized (needed an explicit comment-character).
- mot-syntax: Offset directives RS, SO and FO are no longer limited to constant expressions.
- mot-syntax: Conditional directives also allow non-constant expressions, like label-differences. But the expression has to evaluate in the first assembler pass.
- mot-syntax: Predefines offsets symbols __RS, __SO and __FO with value 0 in -devpac mode.
- output-tos: Section alignment must be 16 bits, not 32. With another two zero-bytes for 32-bit alignment the OS couldn't see any relocations.
|
05-Nov-2009: vasm 1.4c.
- Changed operator priorities from C-like to assembler-like. This means that shifts and bitwise operators have a higher priority now (refer to the documentation for details).
- Comparison operators and logical and/or operators now return -1 for True, instead of 1. This is more common for assemblers.
- Recognize '=' and '<>' operators for equality and inequality (additional to '==' and '!=').
- Deletes the output file when there were any errors.
- -nocase option could run into an internal error when there were escape characters ('\') in a string (since 1.4b).
- m68k: Accept addressing mode syntax (Rn,d) and treat as (d,Rn) for compatibility with other assemblers.
- m68k: Fixed several "displacement out of range" errors. - (bd,ZAn,Rn) when bd didn't fit into 16 bits and has no size extension. - ([bd.l],Rn,od) when od has no size extension and doesn't fit into 16 bits. - (d,PC,Rn) when d is absolute, has no size, and doesn't fit into 8 bits.
- mot-syntax: With -phxass option, macro names are case-insensitive.
- hunk-output: Report undefined symbols in hunkexe-mode as such, instead of just printing "unsupported reloc".
- output-vobj: vasm-internal symbols must not be ignored in the output as relocations refering to the current-pc-symbol depend on them.
|
14-Oct-2009: vasm 1.4b.
- Fixed IfNotDef directive in all syntax modules, which shouldn't regard an undefined but referenced symbol as defined.
- """" was not correctly recognized in macro arguments.
- Fixed -nocase, which also converted string constants to lower case.
- Includes Amiga version string ($VER).
- m68k: The addressing modes (d16,An) and (d8,An,Rn) will no longer be translated into a 32-bit displacement for 68020+, when it contains an undefined symbol.
- m68k: Prevent operands from being optimized or translated when the displacement (also outer-displacement) has a size-extension attached.
- m68k: -opt-fconst optimization was not recognized when vasmm68k is run on a little-endian host.
- 6502: Added all illegal opcodes and additional C64-DTV instructions. They can be enabled with the new -illegal and -dtv options.
- mot-syntax: Blanks in the operand field are allowed, when the new -spaces option is specified.
- std-syntax: .lcomm directive didn't align the data object!
- hunk-output: Option -Fhunkexe generates an executable output file.
|
29-Jun-2009: vasm 1.4a.
- New CPU backend for Z80, 8080, GBZ80, 64180, RCM2/3/4k, named "z80", contributed by Dominic Morris.
- Parser allows a constant like '''' to be recognized as ' and """" as ".
- Recognize strings in data definitions with a length equal to the data width as a constant, which can be used in more complex operations (e.g. .byte "A"+1).
- Syntax modules may define a default section name, which is used when the programmer failed to open a section before the first code. Currently only the "mot" module uses it.
- Support for macro argument \0 added, which is set to the macro's first qualifier (mnemonic extension), when given.
- m68k: Do not optimize move.w #0,An to suba.w An,An, but to suba.l An,An. The old method would only clear the LSW of An!
- m68k: Fixed MOVEC and MOVE USP which ceased working since V1.4.
- m68k: pmove.q (68030/68851) was not recognized.
- m68k: bftst PC-addressing modes were not allowed.
- m68k: MACHINE mc68xxx supported for Devpac compatibility.
- m68k: Devpac3 options: OPT p=<type> to select the cpu, autopc, case, chkpc, debug, symtab, type, warn, xdebug.
- m68k: Some options like Devpac type checking (OPT t) were lost between sections.
- m68k: Supports "ASL/ASR/LSL/LSR/ROL/ROR/ROXL/ROXR Dn" for Devpac compatibility.
- m68k: TST.B An shouldn't be allowed.
- m68k: ColdFire TPF (same as TRAPF).
- m68k: cmp.w/l <ea>,An for ColdFire ISA-B was missing.
- oldstyle-syntax: New directives (mostly from std) for Z80 and z80asm compatibility: section, binary, defs, defp, defl, defc, xdef, xref, lib, xlib, global, extern, local, weak, ascii, asciiz, string.
- oldstyle-syntax: INCBIN has to search the same include paths as INCLUDE does.
- mot-syntax: Blanks in the operand field are no longer allowed (major modification!). This has the advantage to regard everything separated by the operand field with a blank as comment.
- mot-syntax: -devpac option automatically aligns all word- and long-sized data.
- mot-syntax: INCDIR allows multiple include paths, separated by comma.
- mot-syntax: INCBIN has to search the same include paths as INCLUDE does.
- mot-syntax: New directive: OUTPUT (Devpac), LIST, NOLIST, PLEN.
- std-syntax: .incbin directive.
- hunk-output: 8- and 16-bit absolute relocations are supported.
| |