PortAsm/86 for POWER Architecture

Translate Assembly-Language to C using Relogix

PortAsm/86 for POWER Architecture is a source-code translator which converts 80x86 assembly-language code into efficient and maintainable POWER Architecture assembly-language. It automatically deals with architectural differences such as segmented addressing and alignment of memory accesses, and applies aggressive optimizations to ensure good performance of translated code.

It can be used either for applications written wholly in assembler, or for translating the assembler portions of applications written partly in 80x86 assembler and partly in a high-level language such as C or Pascal. It can also be used to help port system-level code and drivers.

PortAsm/86 analyzes the original source code, and separates the semantic meaning of 80x86 instructions or sequences of instructions from irrelevant side effects. After expanding macros and tokenizing the source file, PortAsm/86:

  • Examines the 80x86 instructions in detail, analyzing content and program flow.
  • Analyzes memory references to detect unaligned accesses and endian-dependent code.
  • Maps 80x86 registers on to POWER Architecture registers, optimizing over blocks of code.
  • Replaces sequences of 80x86 instructions with efficient POWER Architecture equivalents.
  • Reproduces only the required behaviour of the 80x86 code, eliminating irrelevant side-effects as much as possible.
  • Adapts the code to fit into the target runtime environment.
  • Generates interface glue for calls to and from native high-level code.
  • Outputs a translated POWER Architecture source file, optionally retaining comments.
  • Optionally outputs additional debugging directives.


  • Translates both 16-bit and 32-bit 80x86 code, automatically handling segmentation issues.
  • Produces easy-to-read POWER Architecture assembler source code that uses the original symbolic labels and variable names.
  • Retains the original 80x86 code in the output file as comments, making the translation process transparent and aiding debugging (the original comments may also be retained).
  • Users can include hand-written POWER Architecture assembler in the original 80x86 source, which with conditional assembly directives makes it easy to maintain a single source base for both 80x86 and POWER Architecture targets.
  • Powerful byte-ordering and alignment analysis makes it possible to port 80x86 code to either a little-endian or big-endian POWER Architecture environment.
  • Powerful code generation optimizations include dynamic register allocation, effective address factoring, optimization of common idiomatic sequences, stack update optimization, removal of superfluous instructions, and call/return optimization. Each optimization can be selectively enabled or disabled.
  • Automatic generation of interface glue for calling out to or being called from native C or Pascal code.
  • Integrates into the standard build process for easy code maintenance after the initial port.
  • Supports source-level debugging, using the original 80x86 code as source, making debugging very simple even for users who have little POWER Architecture assembler knowledge.
  • Supplied with the source code to DABI, an extendable library which implements parts of the MS-DOS programming interface on the target system.

Supported x86 source assembler formats

  • Microsoft MASM 6.0
  • Gnu 'gas'

Supported POWER Architecture target assemblers

  • IBM 'as'
  • Metaware/Tasking 'asppc'
  • Apple 'ppcAsm'
  • Diab Data 'das'
  • Gnu 'gas'
  • Metrowerks CodeWarrior

Supported POWER Architecture target Runtime Environments

  • EABI/ELF standard for embedded applications (with DWARF debugging)
  • XCOFF-format (AIX, MacOS, and PowerOpen compatible)
  • Mach-O (MacOS X Cocoa)
  • SVR4/ELF POWER Architecture standard

Supported Host Development Systems

  • Windows
  • Linux (x86)

Interoperability with other MicroAPL tools

PortAsm/86 for POWER Architecture can be used in conjunction with Relogix for translating legacy code partly to POWER Architecture assembler and partly to C.