XLT86
| Company type | Software tool |
|---|---|
| Industry | Software development |
| Founded | 1978 |
| Headquarters | United States |
| Products | Source-to-source translator for assembly language (8080 to 8086) |
A source-to-source translator, also known as a source-to-source compiler (S2S compiler), transcompiler, or transpiler[1][2][3] is a translator that converts source code written in one programming language into functionally equivalent source code in the same or a different language, often serving as an intermediate representation. Unlike conventional compilers, which generally translate from higher-level languages down to lower-level machine code, source-to-source translators operate between languages of comparable abstraction levels. For instance, converting code from Python to JavaScript differs fundamentally from compiling C into assembly or transforming Java into bytecode.[4] Additionally, automatic parallelizing compilers may modify high-level code annotated for parallel execution, such as those using OpenMP directives or Fortran’s forall construct.[2][5]
Source-to-source compilation is also instrumental in migrating legacy software by upgrading programs to newer language versions or APIs that are not backward compatible. This automated form of code refactoring proves especially useful when original developers are no longer available or manual updates are impractical—for example, converting Python 2 scripts to Python 3 or revising API calls.
Transcompilers can either maintain the original program’s structure to ease ongoing development and debugging, or they can produce output that significantly diverges from the initial source.[6] Tools such as the JavaScript Source Map standard facilitate debugging by linking executed JavaScript back to its original source code, which is particularly helpful when dealing with minified or transpiled scripts.
Prominent examples of transpilers include Closure Compiler, CoffeeScript, Dart, Haxe, Opal, TypeScript, and Emscripten.[7]
Assembly Language Translators
Assembly language translators perform the conversion of source code from one assembly language to another, often bridging different processor architectures and system platforms.
Intel CONV86
To ensure compatibility between the 16-bit 8086 and the earlier 8-bit 8080, Intel introduced CONV86—an ISIS-II-based translator designed to convert 8080 assembly code into 8086 source. This tool, available to OEM clients starting in 1978, supported multiple translation modes and operated on Intel’s MDS-800 development system. Despite its capabilities, users reported stability and reliability concerns.
SCP TRANS86
In 1980, Seattle Computer Products (SCP) launched TRANS86.COM, created by Tim Paterson during the development of 86-DOS. This utility translated assembly instructions from both Intel 8080 and Zilog’s Z80 processors—including mnemonics used by Zilog and Mostek—into Intel 8086 source compatible exclusively with SCP’s ASM86 cross-assembler for the CP/M-80 environment. TRANS86 supported only a limited range of opcodes, registers, and addressing modes, often necessitating manual adjustments after translation. As a single-pass transliteration tool, it did not perform optimizations on registers or jump instructions and required approximately 24 KB of RAM. The initial release was designed for Z80-based systems. Once 86-DOS was operational, Paterson employed TRANS86 in a self-hosting manner to convert it into software executable under 86-DOS. The subsequent version, renamed TRANS.COM, was distributed by Microsoft in 1982.
Sorcim TRANS86
Known also as TRANS86, Sorcim launched a translator converting 8080 code to 8086 in December 1980. Similar to SCP's utility, this tool translated CP/M-80 application source code—including ASM, MAC, RMAC, and ACT80 assembly—into MS-DOS-compatible ACT86 code. It additionally accommodated certain Z80 mnemonics formatted in ACT80. The translation process was performed instruction-by-instruction with optimizations applied to conditional jumps. This software operated on CP/M-80, MP/M-80, and Cromemco DOS systems, requiring a minimum of 24 KB RAM and imposed no restrictions on source file size.
Digital Research XLT86
Introduced in September 1981, Digital Research's XLT86 version 1.0 was the pioneer in incorporating optimizing compiler technology within source translation. Created by Gary Kildall, it transformed Intel 8080 .ASM source files (compatible with ASM, MAC, RMAC) into 8086 .A86 code (ASM86 compatible). Employing global data flow analysis on 8080 registers, this multi-pass translator enhanced code efficiency and handled calling conventions by mapping CP/M-80 BDOS calls to their CP/M-86 equivalents. This enabled seamless porting of software from CP/M-80 and MP/M-80 to CP/M-86 and MP/M-86. The executable XLT86.COM was written in PL/I-80 for CP/M-80 environments. It demanded 30 KB of RAM plus additional memory for program graph data; on systems with 64 KB RAM, it supported source files up to approximately 6 KB, requiring segmentation for larger programs. XLT86 was also distributed for DEC VAX/VMS platforms. While operating at the source level, XLT86’s internal representations and optimizations laid foundational concepts for binary recompilation.
Others
2500 AD Software provided an 8080 to 8086 source code translator as part of their XASM package designed for CP/M-80 systems running Z80 processors, as well as for Zilog ZEUS and Olivetti PCOS platforms.
Since 1979, Zilog included a Z80 to Z8000 translator within their PDS 8000 development environment. Additional Z80 to Z8000 translators were offered by Advanced Micro Computers (AMC) and 2500 AD Software; the latter’s product, named TRANS, supported Z80 CP/M, CP/M-86, MS-DOS, and PCOS operating systems.
The Z88DK development toolkit features a Z80 to i486 source code translator aimed at Netwide Assembler (nasm), called "to86.awk" (released in 2008), which evolved from an earlier 8080 to Z80 converter named "toz80.awk" (from 2003).
In 2021, Brian Callahan created 8088ify, a source code translator converting 8080 CP/M 2.2 applications into MS-DOS format targeting nasm assembly.
Implementations of Programming Languages
A number of programming languages originally employed transcompilers, and some continue to use them as their primary implementation method. Presented below is a curated list of prominent transcompilers that hold significance in software development and enterprise contexts:
Nim Nim C, C++, Objective-C, JavaScript PureScript PureScript JavaScript ReasonML Reason JavaScript ReScript OCaml JavaScript Sather Sather C Scala.js Scala JavaScript Swiftify Objective-C Swift V V C Vala Vala C Visual Eiffel Eiffel C Fable F# JavaScript Fable Python F# Python| Name | Source Language | Target Language | Remarks | |
|---|---|---|---|---|
| Babel | ECMAScript 6+ (JavaScript) | ES5 | ||
| Cerberus X | Cerberus | JavaScript, Java, C++, C# | ||
| Cfront | C++ | C | ||
| ClojureScript | Clojure | JavaScript | ||
| CoffeeScript | CoffeeScript | JavaScript | ||
| Dafny | Dafny | C#, JavaScript, Java, C++, Go, Python | ||
| Dart (dart2js) | Dart | JavaScript | ||
| h5 | C# | JavaScript | ||
| Eiffel (via EiffelStudio) | Eiffel | C, Common Intermediate Language | ||
| Elm | Elm | JavaScript | ||
| Haxe | Haxe | ActionScript 3, JavaScript, Java, C++, C#, PHP, Python, Lua | ||
| HipHop for PHP (HPHPc) | PHP | C++ | ||
| J2ObjC | Java | Objective-C | ||
| JSweet | Java | TypeScript | ||
| Maia | Maia | Verilog | ||
| NACA | COBOL, Java | COBOL, Java | ||
| mrustc | Rust | C | Experimental compiler capable of bootstrapping the Rust compiler (rustc) | |
Codebase Porting
When transitioning between programming languages while aiming to preserve the majority of an existing codebase, employing a transcompiler often proves more practical than undertaking a complete manual rewrite. The extent of manual intervention required on the generated code depends largely on the transcompiler’s quality. Unlike fully "transcompiled languages," which produce output that functions immediately without modification, all transcompilers used for software port expect some degree of human refinement to enhance code clarity and align with platform-specific conventions.
| Tool | Source Language | Target Language | Notes |
|---|---|---|---|
| 2to3 script | Python 2 | Python 3 | Automates conversion but typically demands additional manual corrections. |
| Emscripten | LLVM bytecode | JavaScript | Facilitates execution of C/C++ applications within web browsers. |
| c2go | C | Go | Created to rewrite Go’s compiler from C into Go prior to version 1.5; currently Go compiler is implemented in Go and assembler. |
| C2Rust | C | Rust | Produces unsafe Rust code maintaining compatibility; converting to safe and idiomatic Rust requires manual adjustments supported by automation tools.
|
| Google Web Toolkit | Java with specific APIs | JavaScript | Java code is somewhat restricted compared to standard Java. |
| Js_of_ocaml of Ocsigen | OCaml | JavaScript | |
| J2Eif | Java | Eiffel | Generates Eiffel code featuring Java-like classes adapted for Eiffel syntax and style. |
| C2Eif | C | Eiffel | Produces clean Eiffel output; retains untranslated C and assembly inline. |
| Skip | Swift | Kotlin | Xcode plugin that transpiles Swift iOS applications into native Kotlin for Android utilizing Jetpack Compose. |
| Swiftify | Objective-C | Swift | Web-based service aiding migration from Objective-C to Swift by translating syntax and leveraging runtime compatibility. |
| Runtime Converter | PHP | Java | Translates PHP source into Java with a runtime library plus JNI calls for PHP standard libraries and extensions. |
Transcompiler pipelines
A transcompiler pipeline emerges through the process known as recursive transcompiling, which involves chaining multiple technology layers with transcompilation steps between each. This approach facilitates continuous transformation, effectively establishing a distributed language-neutral specification.
XSLT functions as a flexible transformation utility across diverse technologies, playing a key role in constructing these derivative code pipelines.
Recursive transcompiling
Recursive transcompilation entails the repeated application of transcompiling to create a sequence of transformations—often originating from a single source of truth—that successively convert technology A into B, then C, D, E, F, and eventually back to .
The information that persists throughout this cycle represents the common abstract data shared among components A through F. Although the data undergoes changes in format and structure, its essential content remains preserved upon returning to .
This enduring information, maintained across varying formats, is recognized as derivative content or derivative code.
The practice of recursive transcompilation exploits the characteristic that transcompilers may either keep the translated output closely aligned with the original source for simpler development and debugging, or substantially modify its structure. Tools such as JavaScript source maps facilitate tracing executed code back to its origins, thereby improving maintainability in environments utilizing transcompiled code.
See also
- source-to-source compiler framework featuring pattern-directed rewrite rules
- Fortran 77 to C source-to-source compiler
- (enabling execution of IBM 1401 programs on Honeywell H200)
- source-to-source compiler framework
Further reading
- Charles Randyl Britten, "Translation of 8080 Code to 8086 - Microsoft Translation of 8080 Code to 8086 and Other 16-Bit Processors," 2020.
- "Programming of Sycor Units Eased With TAL II," Computerworld, August 1975.
- Frank J. Zerilli and Craig Derouen, "8080 to 8086 ASM translator, with ASM source," SIMTEL, 1986. (Includes XLT86.COM for translating Intel 8080 assembly to Intel 8086 assembly.)
- Julián Albo, "Pasmo, ensamblador cruzado Z80 portable / portable Z80 cross assembler," 2009. (Z80 cross assembler supporting multiple object code formats including 8086 code generation for MS-DOS and CP/M-86.)
- Steve Ciarcia, "Trump Card – Part 1: Hardware – Speed up your IBM PC with 16-bit coprocessing power," BYTE, May 1984; and "Trump Card – Part 2: Software – TBASIC and C compilers and an assembler," June 1984. (Covers hardware acceleration and software tools including compilers and translators for IBM PC.)
- Microcontroller Division Application Team, STMicroelectronics, "Translating Assembly Code From HC05 To ST7," Application Note AN1106/0200, 2000. (Software translator converting Motorola 6805/HC05 assembly into ST7 source code.)
- Lindsey Kuper, "What do people mean when they say 'transpiler'?" composition.al blog, 2017. (Discussion on terminology in language implementation.)
External links
- Intel to Zilog – Translation Initiative by Gabriele "Gaby" Chaudry (I2Z-Translator)
- PortAsm: Translating Assembler Code, MicroAPL Ltd
- Our Approach – Source-to-Source Conversion Methodology, Micro-Processor Services, Inc. (MPS)
- ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedARC_1988_Transpiler - ↑ 2.0 2.1 Cite error: Invalid
<ref>tag; no text was provided for refs namedPountain_1989 - ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedSector7_1993_Transpiler - ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedDevopedia_Transpiler - ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedCompiler_Types - ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedFowler_2013 - ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedEpic_Games