PortAsm/68K for ARM is a source-code translator which converts 680x0 assembly-language code into efficient, optimized, and maintainable ARM assembly-language. It provides a fast, easy and reliable way to port 680x0 assembler to the ARM architecture, avoiding the need for a lengthy and difficult re-write, which can introduce new bugs into a mature body of source code.
It can be used either for applications written wholly in assembler, or for translating the assembler portions of applications written partly in 68K 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. Supported 68K source assembler formats include Motorola MASM, Microtec Research ASM68K, Gnu gas, Diab Data das, and Apple MPW Asm. The generated ARM assembler is compatible with most of the leading ARM toolsets and runtime environments.
PortAsm/68K analyzes the original source code, and separates the semantic meaning of 680x0 instructions or sequences of instructions from irrelevant side effects such as condition code updates which are not needed. After expanding macros and tokenizing the source file, PortAsm/68K:
- Examines the 680x0 instructions in detail, analyzing content and program flow.
- Maps 680x0 registers on to ARM registers, optimizing over blocks of code.
- Replaces sequences of 680x0 instructions with efficient ARM equivalents.
- Reproduces only the required behaviour of the 680x0 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 ARM assembly-language source file, optionally retaining comments.
- Powerful, easy-to-use source-code analyzer and optimizing code generator.
- Produces easy-to-read ARM assembler source code that uses the original symbolic labels and variable names.
- Retains the original 680x0 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 ARM assembler in the original 680x0 source, which with conditional assembly directives makes it easy to maintain a single source base for both 680x0 and ARM targets.
- Powerful code generation optimizations can be selectively enabled/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.
- Linux (x86)
Interoperability with other MicroAPL tools
PortAsm/68K for ARM can be used in conjunction with Relogix for translating legacy code partly to ARM assembler and partly to C. It can also be used in conjunction with Mimic/68K for mixing translated and emulated code.