Jump to content

XLT86.COM

From Alfawiki
Adapted from the English Wikipedia article XLT86.COM, available under CC BY-SA 4.0Updated 9 August 20255 sources
Intel CONV86
Company typeSoftware tool
IndustrySoftware development
Founded1978
Headquarters
United States
ProductsSource code translator for 8080 to 8086 assembly language

A source-to-source translator, also known as a source-to-source compiler (S2S compiler), transcompiler, or transpiler, is a category of translator that converts source code written in one programming language into equivalent source code in either the same or a different language, typically serving as an intermediate representation. Unlike conventional compilers that translate code from higher-level languages down to lower-level ones, source-to-source translators operate between languages that share similar levels of abstraction. For example, they might convert Python code into JavaScript, whereas traditional compilers often translate from languages such as C to assembly or from Java to bytecode. Automatic parallelizing compilers frequently modify high-level code by incorporating parallel constructs or annotations like OpenMP or Fortran's forall directives.

This form of compiling is also instrumental in transitioning legacy software to newer programming languages or APIs that do not maintain backward compatibility. Such automated code refactoring proves especially useful when original programmers are unavailable or the codebase is too extensive for manual revision—for instance, moving from Python 2 to Python 3 or updating outdated API usages.

Transcompilers may either maintain the original program’s structure to ease debugging and development or transform it so extensively that the resulting code bears little resemblance to the source. Tools designed for debugging, such as the JavaScript Source Map standard, help by linking transpiled JavaScript back to its original code, which is particularly helpful when dealing with minified or transpiled output.

Prominent examples of transcompilers include Closure Compiler, CoffeeScript, Dart, Haxe, Opal, TypeScript, and Emscripten.

Assembly language translators

Assembly language translators perform the conversion of source code from one form of 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 developed CONV86, an ISIS-II-based translator designed to convert 8080 source code into 8086 assembly. Available since 1978 for OEM customers, this early tool supported various translation modes and operated at 2 MHz on an Intel MDS-800 system equipped with 8-inch floppy drives. Despite these capabilities, user feedback suggested that its reliability was limited.

SCP TRANS86

In 1980, Seattle Computer Products (SCP) introduced TRANS86.COM, a utility created by Tim Paterson amid the development of 86-DOS. This program translated assembly instructions from Intel 8080 and Zilog Z80 processors—including mnemonics specific to Zilog and Mostek—into Intel 8086 source code compatible exclusively with SCP’s ASM86 cross-assembler for the CP/M-80 operating system. The tool handled only a narrow subset of opcodes, registers, and addressing modes, frequently necessitating extensive manual adjustments. As a straightforward single-pass transliterator, TRANS86 did not optimize registers or jumps and required approximately 24 KB of RAM. Its initial release targeted Z80-based machines. After completing 86-DOS, Paterson employed TRANS86 in a self-hosting manner to convert it into an executable running under 86-DOS itself. The second iteration was renamed TRANS.COM. By 1982, this translator was reportedly distributed through Microsoft.

Sorcim TRANS86

Sorcim, also identified as TRANS86, introduced an 8080-to-8086 code translator in December 1980. Similar to SCP's solution, this tool converted CP/M-80 assembly language files—including ASM, MAC, RMAC, and ACT80 formats—into an ACT86-compatible format for MS-DOS. It additionally accommodated certain Z80 mnemonics within the ACT80 format. The translation process operated on a per-instruction basis and incorporated optimizations specifically for conditional branch instructions. This software was compatible with CP/M-80, MP/M-80, and Cromemco DOS environments, requiring a minimum of 24 KB RAM and imposing no restrictions on source file size.

Digital Research XLT86

In September 1981, Digital Research released the more sophisticated XLT86 version 1.0, which was notable for introducing optimizing compiler methodologies into source code translation. Developed under the leadership of Gary Kildall, XLT86 transformed Intel 8080 assembly files (.ASM), compatible with assemblers such as ASM, MAC, and RMAC, into 8086 assembly code (.A86) suitable for ASM86-compatible assemblers. Employing a multi-pass approach with global data flow analysis focused on register utilization, the translator enhanced output efficiency by reducing code size and managing calling conventions effectively. It also translated CP/M-80 BDOS system calls to their CP/M-86 equivalents, facilitating seamless application porting from CP/M-80 and MP/M-80 to CP/M-86 and MP/M-86 platforms. The executable XLT86.COM was implemented in PL/I-80 and ran under CP/M-80. The tool demanded at least 30 KB of RAM plus additional memory for handling the control-flow graph. On systems with 64 KB RAM, it could process source files up to approximately 6 KB in size, necessitating the division of larger files before translation. Furthermore, XLT86 was made available on DEC’s VAX/VMS operating system. Its combination of source-level input/output capabilities and advanced optimization techniques contributed foundational concepts later applied in binary recompilation.

Others

The company 2500 AD Software provided an 8080-to-8086 source code translator as part of their XASM suite designed for CP/M-80 systems equipped with Z80 processors, as well as for Zilog ZEUS and Olivetti PCOS platforms.

Since 1979, Zilog has included a Z80-to-Z8000 translator within their PDS 8000 development environment. Additional suppliers such as Advanced Micro Computers (AMC) and 2500 AD Software also offered Z80-to-Z8000 translation tools; notably, 2500 AD’s TRANS product supported Z80 CP/M, CP/M-86, MS-DOS, and PCOS operating systems.

The Z88DK development toolkit incorporates a source code translator from Z80 to i486 architectures named "to86.awk," released in 2008. This utility is derived from Douglas Beattie Jr.’s "toz80.awk," a converter created in 2003 that translated 8080 code to Z80.

In 2021, Brian Callahan developed "8088ify," a source-level translator converting 8080 CP/M 2.2 assembly code into MS-DOS assembly targeting the Netwide Assembler (nasm).

Programming language implementations

A number of programming languages were initially created as transcompilers, with some continuing to use transcompilation as their primary mode of implementation. The following table highlights key transcompilers commonly employed in commercial and software engineering contexts:

ReScriptFableFable Python
Noteworthy transcompilers
Name Source language Target language Notes
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 Dart JavaScript
h5[1] 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[2] Java Objective-C
JSweet[3] Java TypeScript
Maia[4] Maia Verilog
NACA COBOL, Java COBOL, Java
mrustc Rust C "mrustc" is an experimental compiler capable of bootstrapping the official Rust compiler.
Nim Nim C, C++, Objective-C, JavaScript
PureScript PureScript JavaScript
ReasonML Reason JavaScript
OCaml JavaScript
Sather Sather C
Scala.js Scala JavaScript
Swiftify[5] Objective-C Swift
V V C
Vala Vala C
Visual Eiffel Eiffel C
F# JavaScript
F# Python

Porting a codebase

When transitioning to a different programming language while preserving most of the original codebase, employing a transcompiler often proves more practical than rewriting the software from scratch. The necessity for manual intervention varies based on the transcompiler's sophistication to ensure the code functions correctly. Unlike languages designed for seamless transcompilation where output requires no changes, tools used for software porting generally demand human refinement to enhance clarity and conform to platform-specific standards.

Tool Source language Target language Remarks
2to3 script Python 2 Python 3 Automates much of the conversion process but often requires additional manual edits.
Emscripten LLVM bytecode JavaScript Facilitates running C/C++ applications within web browsers.
c2go C Go Created to translate Go’s compiler from C to Go before version 1.5; after that, Go was implemented in Go and assembler.
C2Rust C Rust Produces unsafe Rust code maintaining compatibility; converting this into idiomatic and safe Rust necessitates manual work, although helper tools exist.
Google Web Toolkit Java with specific API JavaScript Requires Java code to conform to stricter constraints compared to standard Java.
Js_of_ocaml of Ocsigen OCaml JavaScript
J2Eif Java Eiffel Generates Eiffel source closely mirroring original Java structure but adapted to Eiffel syntax and conventions.
C2Eif C Eiffel Produces clean Eiffel code; incorporates C and assembly snippets if full translation is not possible.
Skip Swift Kotlin An Xcode extension that transpiles Swift iOS applications using SwiftUI into native Kotlin apps for Android utilizing Jetpack Compose.
Swiftify Objective-C Swift Web-based tool facilitating migration from Objective-C to Swift by converting syntax; benefits from runtime compatibility between both languages.
Runtime Converter PHP Java Automatically translates PHP source into Java; includes a Java runtime library and JNI calls for PHP standard libraries and extensions.


Transcompiler Pipelines

A transcompiler pipeline is created through the method of recursive transcompiling, which involves chaining multiple technological layers with transcompilation steps connecting each stage. This approach facilitates continuous technology transformation, effectively producing a distributed language-agnostic specification.

XSLT serves as a flexible transformation utility employed across diverse technologies to construct these derivative code pipelines.

Recursive Transcompiling

Recursive transcompiling (also known as recursive transpiling) refers to the repeated application of transcompilation to develop a sequence of transformations, typically originating from a single source of truth. This process converts A → B → C → D → E → F and eventually cycles back to . Throughout this sequence, critical information is retained, reflecting the shared abstract data recognized by components A through F.

Every iteration within the pipeline preserves this essential content, which may be represented differently but ultimately reverts to its initial form after multiple transcompilation stages. This persistent data is identified as derivative content or derivative code.

The recursive transcompilation technique capitalizes on transcompilers’ capacity to either keep translated output closely aligned with the original source to simplify development and debugging, or to substantially modify its structure. Debugging aids such as JavaScript source maps enable tracing executed code back to its original source in transcompiled languages, thereby improving maintainability and developer productivity.

See also

  • – source-to-source compiler framework utilizing pattern-directed rewrite rules
  • – source-to-source compiler converting Fortran 77 into C
  • (executing IBM 1401 programs on Honeywell H200)
  • (also known as Binary optimization)
  • – framework for source-to-source compilation


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, 1975.
  • Frank J. Zerilli and Craig Derouen, "8080 to 8086 ASM translator, with ASM source," SIMTEL, 1986. (Includes XLT86.COM executable for translating Intel 8080 assembly to 8086 assembly.)
  • Julián Albo, "Pasmo, portable Z80 cross assembler," 2009. (Supports generating 8086 code from Z80 sources for DOS and CP/M-86.)
  • Steve Ciarcia, "Trump Card – Part 1: Hardware – Speed up your IBM PC with 16-bit coprocessing power," and "Trump Card – Part 2: Software – TBASIC and C compilers and an assembler," BYTE, 1984. (Covers hardware acceleration and software tools including compilers and translators.)
  • STMicroelectronics Microcontroller Division Application Team, "Translating Assembly Code From HC05 To ST7," Application Note, 2000. (Software translator converting Motorola HC05 assembly to ST7 source code.)
  • Lindsey Kuper, "What do people mean when they say 'transpiler'?" composition.al blog, 2017.

External links

  • Das Intel zu Zilog – Translation Initiative by Gabriele "Gaby" Chaudry (I2Z-Translator)
  • PortAsm: Assembler-to-Assembler Translation, MicroAPL Ltd
  • Our Approach – Source-to-Source Conversion Procedure, Micro-Processor Services, Inc. (MPS)
  1. ↑ Cite error: Invalid <ref> tag; no text was provided for refs named Olivenbaum
  2. ↑ Cite error: Invalid <ref> tag; no text was provided for refs named J2ObjC
  3. ↑ Cite error: Invalid <ref> tag; no text was provided for refs named JSweet
  4. ↑ Cite error: Invalid <ref> tag; no text was provided for refs named Maia_2020
  5. ↑ Cite error: Invalid <ref> tag; no text was provided for refs named Swiftify