www.riscos.com Technical Support:
Acorn Assembler


Support for AAsm source

AAsm was an alternative variant of the assembler supplied with previous releases of this product. It has been removed from this product, but to ease porting source code written for AAsm, some limited support has been added to ObjAsm. This support for AAsm may be removed in future releases of Acorn Assembler.

To enable this support you must pass the new -ABSolute option to ObjAsm. There is no option on the Setup menu directly corresponding to this option; the best way to pass the option from the desktop is to include it in the Setup menu's Others option (see Specifying other command line options).

The -ABSolute option

The new -ABSolute option makes ObjAsm accept AAsm source code. This option is provided to simplify the use of code originally developed using AAsm. Unlike AAsm, the output format produced is AOF, as for any ordinary assembly operation, and this must be linked by the linker as usual, in order to create an absolute image. However, the contents of the AOF file will be marked as having an absolute address (if either the ORG or LEADR directive is used), and the linker, given suitable options, can produce an image file equivalent to that previously generated directly by AAsm. The following changes to normal ObjAsm input syntax apply:

  • There is an implicit AREA declaration before the start of the source. The normal rule that there must be an AREA directive in the source before use of any instruction or data generating statements does not apply. The implicitly declared area is called ABS$$BLOCK, and has the new ABS attribute (see Area attributes) implying that it must be loaded at a fixed absolute base address.
  • The directive LEADR is accepted. (Previously only AAsm implemented this; ObjAsm did not.)
  • The ORG directive, if used within the source file, will apply to the implicitly declared current area.
  • The following directives are not recognised (since they were not available with AAsm), and may be used for any other purpose, in particular as macro names: AREA, IMPORT, EXPORT, STRONG, ENTRY, KEEP, AOF, AOUT.

This change is important, since ObjAsm recognises directives before it does macro names.

This edition Copyright © 3QD Developments Ltd 2015
Last Edit: Tue,03 Nov 2015