# Discovering Eastern Europe PCs by Hacking Them ... Today

Stefano Bodrato, Fabrizio Caruso, Giovanni A. Cignoni

► To cite this version:

Stefano Bodrato, Fabrizio Caruso, Giovanni A. Cignoni. Discovering Eastern Europe PCs by Hacking Them ... Today. IFIP International Conference on the History of Computing (HC), Sep 2018, Poznan, Poland. pp.279-294, 10.1007/978-3-030-29160-0_14. hal-02386534

HAL Id: hal-02386534

https://inria.hal.science/hal-02386534

Submitted on 29 Nov 2019

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Discovering Eastern Europe PCs by Hacking Them ... Today

Stefano Bodrato, Fabrizio Caruso, Giovanni A. Cignoni*

Progetto HMR, Pisa, Italy
{stefano.bodrato, fabrizio.caruso, giovanni.cignoni}@progettohmr.it

**Abstract.** A rich array of personal computers was developed in Eastern Europe during the later years of the Cold War. Because computer science would not be the same without personal computers, these devices deserve greater attention in the history of computing. The story in the West, the so-called PC revolution, started in the late 1970s: it was rooted in hobbyist and do-it-yourself clubs and brought the discipline closer to many people. A revolution took place also on the other side of the Iron Curtain: it happened a few years later, yet in a comparable way. Faced with an embargo that limited the availability of the first western PCs, Eastern Europe companies and hobbyists innovated on their own, providing the users with a number of home and personal computers. Today, the scenario of personal computing has completely changed; however, the computers of the 1980s are still objects of fascination for a number of retrocomputing fans who still enjoy using, programming and hacking the old *8-bits*. Yesterday's hobbyists have become today's retrocomputing enthusiasts: they provide an important window into these Eastern Europe PCs, which otherwise would have been forgotten. In this article we give an overview on about fifty Eastern Europe PCs from the late 1970s to the 1980s. A few were clones of Western PCs, others shared some hardware and were compatible, others used significant portions of the firmware. Besides the preservation of old hardware and software, the retrocomputing community is engaged in the development of emulators and cross-compilers. Such tools can be useful for historical investigation based on reverse engineering. For example, we used one of them to investigate the originality of the BASIC interpreters loaded in the ROMs of Eastern Europe PCs.

**Keywords:** 8-bit computers • Emulators • Hacking • Retrocomputing Communities • Software Development Tools.

## 1 Introduction

The diffusion of home and personal computers has brought information technology and computer science closer to many people. Actually, it has changed the computer industry by orienting it toward the consumer market. Today, personal computing is perceived as a set of devices – from smartphones to videogame consoles – made just to be used. The average customer of personal IT is hardly interested in programming.
At the beginning, it was different. Programming, even hacking, was a common activity among the owners of the first PCs. It was so in the West, but also in the East. In the West, hobbyists and clubs like the well-known "Homebrew Computer Club" were determinant in the beginning and in the initial rise of the PC industry [1]. During the following years, hacking groups [2] emerged and often competed against each other to prove who was the most skilled programmer. In Eastern Europe, the computer hobbyist movement developed later, only a few years indeed, yet a significant delay. Western computers were impossible to obtain and the availability of the few Eastern-made models was very limited. Even though, this kind of hacking attitude existed [3].

Nowadays, the meaning of the hacking attitude has shifted and hackers have been institutionalized. Meanwhile, the term itself mutated its original, positive, meaning into an evil one. However, one place where hackers remain active is inside the communities of retrocomputing enthusiasts – in fact, some of them actually never stopped: they were hackers back in the 1980s.

Besides preserving old pieces of hardware and software for the purpose of using them as in the past, these present-day hackers also enjoy programming their machines. Moreover, to ease their coding activities they develop new tools like emulators and cross-compilers able to run on modern PCs to generate binaries for vintage computers. Writing a program using the screen editor of the *Commodore 64* is fun, it is even an immersive way to revive the spirit of the era. Nevertheless, working on a modern PC using a full-featured editor and a cross-compiler, and then testing the result on an emulator running in a side window, is far more productive.

In this paper, we highlight the continuity between yesterday's hobbyists and today's retrocomputing enthusiasts. Focusing on a particular subset of 8-bit machines – the Eastern Europe PCs – we show how the retrocomputing community is playing an important role as unofficial, but valuable, repository of knowledge about old technologies. Moreover, the tools the community is developing and maintaining are useful to dig inside the old machines and discover relevant facts about their history, like measuring the similarities between different systems and giving better meanings to words like "compatible," "copy," "clone" – which in the particular context of Eastern Europe PCs have some relevance.

The paper is organized as follows: Section 2 provides a list of the computers that were produced in Eastern Europe in the late 1970s and early 1980s; we do not go into technical details, but rather we try to provide an organized and representative map of the fascinating Eastern Europe PCs galaxy. Section 3 and 4 describe some modern development tools for 8-bit computers, focusing in particular on those that make it possible, today, to enjoy programming/hacking old East Europe 8-bit computers. Section 5 provides an example of using such tools to prove or disprove the originality of some of the computers produced in Eastern Europe.

## 2 A Diverse Galaxy

In the West, the beginning of the PC era was characterized by a plethora of attempts. Many of the first commercial PCs had very limited success and short lives: *Radio*
*Electronics Mk8, Sphere 1, Sol-20, ISC Compucolor 8001*, just to cite some. Better luck had the *MOS Technology KIM-1*, from which originated the *Commodore PET* series, and the *Apple-1*, which started the well-known success story. While all of these PCs were based on a little set of microprocessors (*MOS Technology 6502, Zilog Z80, Intel 80xx, Motorola 6800*), no real standard was in place. Some of the early proposals were a bit more popular, like the *Altair 8800*: its *S-100 Bus* had limited success as a compatibility layer. The *CP/M* as an operating system had success only among 8-bit business computers. More successful models like the *Commodore PETs*, the *Apple II*, the *Tandy TRS-80* were "standard" only because of their good numbers on the market. In 1981 the introduction of the *IBM PC* eventually gave a de facto standard for the PC world while the home segment, for few years more, was still dominated by Commodore and Sinclair with a significative - at least as standard attempt - presence of the *MSX Consortium*.

The Eastern Europe scenario was not on par with the large variety of machines that in the late 1970s and early 1980s were available in the West. Nor was possible to replicate the selling results of the West. This was mainly caused by the CoCom [4] embargo, which made it hard to sell Western technologies to the Soviet Bloc. However, a remarkable diversity existed: the embargo did not stop Eastern Europe countries from designing their own computers as well as cloning Western computers by all sorts of reverse-engineering techniques [3].

In the following section we list those models for which it is possible to speak of "production." There were also handmade projects built in very few exemplars, but these are beyond our survey.

Many Eastern PCs were clones of Western popular machines (e.g., the ZX Spectrum, the Apple II, the TRS-80) as well as less common ones, some even built under license. The iconic Commodore 64 is remarkable for its absence. The probable reason was its use of custom chips (the VIC-II and the SID), which were hard/expensive to clone.

Some Western products were also marketed in Eastern Europe countries and a few computers that sold poorly in the West had some luck in the East (e.g., the *Commodore 16* and *116* in Hungary or the British *Sord M5* in Czechoslovakia), but these were Western computers and are therefore outside of our survey.

## 2.1 The Map

In the Appendix, we summarize a "map" of 8-bit personal computers that were produced in Eastern Europe. The map does not aim for a technical comparison and details are limited to the essential. It focuses on the models that can be considered PCs, excluding, for example, borderline products such as learning boards (e.g., *Poly-computer 880*, *PMI-80*) or computerized chessboards (e.g., *Schachcomputer-SC2*).

The table is grouped by categories. The choice of categories is obviously subjective, yet it helps to have a presentation order. We propose four categories: do-it-yourself projects, home computers (generally targeted to entertainment and education), personal computers (targeted to business), and clones. Inside each category, the order is chronological with respect to the date of first introduction.

As a last note, we have to remark that, despite the definitions, few home computers were actually used in Eastern Europe homes. For most of the 1980s, given the high
costs and demand by industries and educational institutions, computers were not easy to buy for personal use.

## 2.2 Insights and Stories

A detailed narration of the events related to the development of personal computers in Eastern Europe is beyond the objectives of this paper. In the following, we collect just some of the most relevant facts.

**The Microprocessors.** The PCs produced in Eastern Europe countries were usually based on CPUs that were equivalent to the most common Western CPUs. Eastern chips were made either from copies of the original die masks or by reverse engineering the chips. One notable case was the *K1801* series, which was able to run binary code compiled for the DEC PDP-11, but did not have a correspondent Western chip and had to be mounted on specific circuit boards. The following summarizes the facts about the CPU families present in our map.

* K580, Soviet Union, since 1979 → Intel 8080

* K1801, Soviet Union, since 1980 → DEC PDP-11 binary compatible

* U880, German Democratic Republic, since 1980 → Zilog Z80

* MHB8080, Czechoslovakia, since early 1980s → Intel 8080

* MMN80, Romania, since late 1980s → Zilog Z80

* CM688, Bulgaria, since early 1980s → Intel 8086

* KP1810, Soviet Union, since 1982 → Intel 8086

In few cases Eastern PCs were mounting chips made outside the Iron Curtain, like the CDP182 that was made by RCA or the UM6502 that was a 6502-equivalent made by UMC in Taiwan. Other PCs based on “original” CPUs probably used second-source chips, maybe coming from the South East Asia were Western brands were starting to outsource their production.

Technologies and components were sometimes shared among different countries of the Eastern Bloc under Comecon agreements. Comecon (Council for Mutual Economic Assistance) was an economic organization under the leadership of the Soviet Union.

**Soviet Union.** During the Khrushchev era, until the mid-sixties, computer production had been identified as strategic and sustained through government policies. However, in the 1970s the competition among different government departments led to the lack of standards and to a wider gap with respect to the West. At this point, the Soviet government decided to abandon the development of original computer designs and instead tolerate the pirating of Western systems.

The computer hobby movement emerged in the Soviet Union during the early 1980s. In 1978–79, G. Zelenko, V. Panov and S. Popov at the Moscow Institute of Electronic Engineering built a computer prototype based on the new *KR580IK80* microprocessor and named it *Micro-80*. Eventually, the schematics were published in *Radio* magazine becoming the first Soviet do-it-yourself computer. The project was successful and later led to the development of another DIY successful computer: the *Radio-86RK* [5].
The *Agat* started as an educational project commissioned by the USSR Ministry of Radio. It was inspired and compatible with the Apple ][, but it was not exactly a clone. The first version in 1983 suffered from reliability problems and was discontinued. The *Agat-7* and *Agat-9* models were mass produced and were often used in schools.

Piracy was common and copies of Western applications were widespread. In July 1984, the CoCom embargo was partially lifted on common desktop and microcomputers. This made it possible for the Soviet Union to purchase thousands of Western computers in 1985.

During Perestroika, a program to expand computer literacy in Soviet schools was started in 1985 [7]. A common computer in schools was the *Elektronika BK-0010* which, while being a home/educational computer, was inspired by the PDP-11 architecture. In 1987, as part of an educational program, it was followed by the *Elektronika MS-0511*, which was still PDP-11 compatible and featured enhanced graphics. In 1987, the *Vector-06C* was also released; still aimed at education, it had similar capabilities to the *MS-0511*, but was based on an 8080/Z80 architecture. Clones of the Sinclair Spectrum computers were common and many hobbyists built their own versions. It is impossible to track all versions because many assembled and modified them in different ways. The *Pentagon* [8] and *ZS Scorpion* [9] models were common. Both were clones of the Spectrum 128k. The Pentagon, designed by Vladimir Drozdov in 1989 and manufactured by amateurs all over the Soviet Union, was the most common model. In 1994 the ZS Scorpion was released and manufactured by Zonov and Co. While less common, the ZS Scorpion was a more accurate clone.

In 1987, the Law on Cooperatives allowed independent worker-owned cooperatives to operate the Soviet Union. As a consequence, there was a proliferation of small companies selling hardware and software. Moreover, during the late Perestroika years, Western technology embargoes were relaxed further, leading to decline of local production in favor of the adoption of Western systems such as IBM-compatible PCs.

**German Democratic Republic.** Commercial East German home computers were manufactured by VEB Mikroelektronik and by VEB Robotron. In particular, the KC "Klein-computer" [10, 11] home computers were built by VEB Mikroelektronik and later by VEB Robotron. This resulted in a conflict between the two companies [12]. The KC home computers were based on the U880 CPU. They were mostly used in schools. For personal reports on Robotron from its former employees see [10] and [13].

From a technical point of view, the Robotron home computers can be divided into four series, not compatible among them. The *KC 85/1* (originally *Z9001*) and *KC 87* models were produced from 1984 until 1989 by VEB Robotron-Meßelektronik "Otto Schön" in Dresden. The *KC 85/2* (originally *HC900*), *KC 85/3*, *KC 85/4*, were produced from 1984 until 1989 by VEB Mikroelektronik "Wilhelm Pieck" in Mühlhausen. The *Z 1013*, presented in 1984, was produced from 1985 and sold as a kit by VEB Robotron in Riesa. The *A5105*, also known as *BIC* (for "Bildungscomputer," i.e., educational computer), was produced from 1989 until 1990 by Robotron in Dresden.

In 1984 VEB Büromaschinenwerk Sömmerda developed the PC1715 and PC1715W computers and presented them to the public. Serial numbers span the years 1985-1989. They used the UA880 processor RAM and were meant primarily as office PCs [14].
Robotron produced also educational boards with a limited built-in display, for instance, the *Polycomputer 880*, introduced in 1983. At the very end of the GDR, Robotron produced and sold in small quantities the *KC Compact*, an *Amstrad CPC* clone close to the Amstrad *CPC 6128* and *664* models.

**Romania.** In Romania, both Western clones and original computers were created in the 1980s [15]. In many cases they were designed by Adrian Petrescu from the Politehnica University of Bucharest. The most notable original computer was the *aMic*, designed by Petrescu, in 1982 and later produced at Fabrica de Memorii in Timișoara until 1984. It was used in research, education and in the industry.

From 1985 to 1994, Romania produced mostly the *HC* family of computers (*HC 85*, *HC 85+*, *HC 88*, *HC 90*, *HC 91* and *HC 2000*). They were all clones of the Sinclair ZX Spectrum, originally designed by Adrian Petrescu and later redesigned for mass production by ICE Felix, a brand which was already selling the *Felix PC* (1985–1990), an IBM-compatible, as well as other lines of micro and mini computers, including a line inspired by the *IBM/360*.

**Poland.** During the 1980s, Poland produced primarily clones of Western computers [15]. *Meritum I* and *II* were released in 1983 and 1985, respectively, by Mera-Elzab, a brand originally specialized in cash registers. They were clones of the *Tandy TRS-80*. The *800 Junior* (1986) and the *804 Junior PC* (1990) were ZX Spectrum clones primarily intended for education and they were produced by the Elwro plant for schools.

**Bulgaria.** Most of the home computers produced in Bulgaria were manufactured in the city of Pravetz and so a number of different models were named Pravetz. For the most part they were clones of the Apple II; the first one was named IMKO-1 and was released as early as 1979. The 8D was instead a clone of the British Tangerine Oric. ZOT had already produced computers of the ES EVM series (Soviet clones of the IBM/360) under a Comecon agreement. In the 1980s IZOT produced the IZOT 1030, based on East German-made U880, and later several IBM PC and PC/XT clones.

**Yugoslavia.** Yugoslavia was not a member of the Warsaw Pact and therefore was less affected by the CoCom blockade on technology imports. A notable home computer was the Yugoslav *Galaksija* [16], built in 1983 by Vojislav Antonic, whose schematics were published as a DIY project in a special issue of the *SAM* popular science magazine. It is estimated that at least 8,000 people bought the kit to build this computer, but others may have bought the required chips separately. It was also adopted by many schools.

Less successful computers that were built in Yugoslavia were the *Lola 8*, *Pecom 32* and *64*, *Galeb*, *Orao*, *Ivel Ultra* and *Ivel Z3*.

**Czechoslovakia.** The main producer of computers in Czechoslovakia was Tesla (for "Technika Slaboprouda," or low-voltage technology). As a major electronics factory, Tesla was involved in building computers since the late 1960s. For a detailed and personal account on the Czechoslovakian home computers, refer to [17].

In the 1970s, Eduard and Tomáš Smutný designed the industrial computer *JPR-12*, based on the Israeli *Elbit* version of the PDP-11 and pushed it into production by Tesla. Some years later they made the *JPR-1*, a simple 8-bit computer based on the Intel 8080. The complete schematics of these computers were later (1983) published in the hobby
magazine *Amatérské Rádio*. A Z80-based and CP/M-compatible version was also released. In 1985, the U880-based *Ondra* was introduced.

Other Tesla computers were designed by Roman Kišš. The *PMI-80* single board computer was used in schools. The *PMD-85* series was very popular in Slovakia due its graphics capabilities. The PMD had some clones (*MAŤO*, *Zbro-jováček*, *Didaktik Alfa/Beta*) that were built mainly for schools. In the Czech region the *IQ-151*, built by ZPA, was common in schools. Didaktik Skalica also built the *Didaktik Gama* (1987), *Didaktik M* (1991) and *Didaktik Kompakt* (1992), which were ZX Spectrum-clones.

Some Western computers were available through the state-run Tuzex shops. In addition to the most common and known computer models (ZX Spectrum, *Atari 800 XL*, *Sharp MZ800*), the *Sord M5* developed quite a rich hobbyist scene.

**Hungary.** Hungary produced both Western clones as well as original home computers. In the early 1980s, the Budapesti Radiotechnikai Gyar (Radiotechnical Factory of Budapest) produced the *BRG ABC-80*; it was a re-branded Swedish *Luxor ABC-80* built under an official license and meant for schools. From 1983, Híradástechnika Szövetkezet built the *HT-1080Z* and the *HT-2080Z* computers, which were rebranded versions of the Honk Kong-made EACA *VideoGenie I* computers, which, for their part, were an evolution of the TRS-80 Model I. In 1986 Videoton built the *TV Computer*, which was derived from the British *Enterprise* computer and was used in schools.

From 1984, Microkey manufactured the *Primo A* and *B* [18] as an original project which, unfortunately, suffered from poor assembly and a inferior keyboard. The *Home-Lab-2* was an original Hungarian design by József & Endre Lukács. It was also marketed under the name *Aircomp-16*. The successor *HomeLab-3* was sold in kit form.

## 3 Emulation to Keep Old Hardware Alive

All the different systems presented above are rare nowadays and inaccessible. Some completely died-out. To keep them alive, emulation is one solution. By emulators here we mean any program that can reproduce the behavior of a given system at a specified interface level. We are interested in the machine-language level (excluding, for instance, simple BASIC-level compatibility). In practice, the effects of the instructions are reproduced exactly. In other words, it should not be possible to write a program able to detect that it is running on a machine different from the original. Emulators can be based on different approaches to hardware modelling and simulation; they may for instance replicate the hardware at very low level (e.g., discrete logic). For the historian however, the most relevant fact is the ability to run legacy 8-bit binaries and (re)discover how software ran decades ago.

As far as Eastern Europe computers are concerned, for most cases, the best choice is the well-known "universal" *MAME* emulator [19]. Although originally targeted to be a multiple arcade machine emulator, it has, over time, become a generic emulation platform well suited for many PC architectures. The code used to emulate some common hardware components is shared by different systems. This results in a huge base library that is constantly updated to support new systems – a valuable starting point in the emulation of less-known systems like the Eastern Europe computers.
Moreover, MAME is not meant for retro-gamers: the project's goal is accurate emulation of systems with no extra frills such as net-play, ROM hacks, improved graphics, and so on. They are actually forbidden as part of the rules governing the community of MAME developers.

MAME provides emulation for the East German Robotron KC series, the Yugoslav Galaksija, the Bulgarian Pravetz 8D, the Hungarian Primo series and many more. For the Galaksija, there is no usable alternative because the other existing emulators (e.g., *GalaxyWin* [20]) are no longer maintained.

For a few specific Eastern Europe systems there are dedicated emulators that, currently, may be more accurate than MAME. For the Robotron KC series and nearly all other East German home computers from the 1980s, a good alternative is *JKCEMU* [21], which is a specialized multi-system emulator for East German computers. For the Pravetz 8D there is *Orictron* [22], which is an emulator for the full Oric series, clones included. Concerning the Sinclair Spectrum clones, many good Spectrum emulators support them. A notable example is the *Fuse* emulator [23], which supports both the Soviet Pentagon and ZS Scorpion clones.

# 4 Other Tools for Hacking and Discovering

The scenario of personal and home computers made in Eastern Europe was quite rich. A likewise rich community of retrocomputing enthusiasts is playing an important role as an unofficial, but valuable, repository of knowledge about the memory and the technologies of such machines. Moreover, the community is developing and maintaining tools to continue programming the old Eastern Europe PCs. As a testimony to the continuity between yesterday's hobbyists and today's retrocomputing enthusiasts, we propose a brief survey of the development tools for Eastern Europe computers that are currently available and actively maintained.

The most widespread and, among the retrocomputing developers, most appreciated development tools are the ANSI C cross-compilers and cross-assemblers. The prefix "cross" means that the compiler/assembler does not run on the system for which it is generating the binary code. Compilers and assemblers have old 8-bit systems as targets but run on modern computers.

Today's cross-assemblers can be used within modern integrated development environments for those who still want to code in the Assembly language for maximum efficiency; or just on principle: out of nostalgia or to exhibit skill. Assembly is, in practice, a human-readable form of machine language. Therefore, it is portable, at best, only across computers with the same architecture.

On the other hand, C is a universal language; yet it is very efficient. C was used extensively by old PC programmers that had to make the best possible use of every byte of memory and of every processor clock cycle. Thanks to modern compiler optimization algorithms and to the power of today PCs, cross-compilation produces by far better code than compiling through original compilers running on the old 8-bit systems: carefully written C code can today be almost as fast as manually written Assembly code.
Among larger projects, the currently most active are *CC65* [24], for the systems based on the MOS 6502 microprocessor, and *Z88DK* [25], for those based on the Zilog Z80. A project that supports many modern 8-bit CPUs, as well as a few legacy CPUs, is the retargetable cross-compiler *SDCC* [26]. Some projects have a very long history; both *Small-C* [27] and *ACK* [28], for instance, were born as native 8-bit compilers and assemblers in the early 1980s.

## 4.1 The Z88DK Development Kit

The Z88DK kit was, in the beginning, an evolution of the Small-C compiler (*SCCZ80*) in its variant for the Z80 CPU. The project started in 1998 to support the *Cambridge Z88*. The portable computer was released ten years before (by one of the many companies founded by Clive Sinclair) yet had a community of enthusiastic users. The first releases of Z88DK were very appreciated as well as the first experimental port to the ZX Spectrum. Many supported the development with feedbacks and contributions.

Over time, the software architecture of the project has evolved toward greater flexibility. Currently Z88DK supports development in both C and Assembly for about 70 PC architectures based on the Z80 and its close relatives. Recently, the inclusion of SDCC as a second compiler required relevant changes on the assembler, a global revision of the libraries and the adaption of many other elements like the compiler front-end and the optimizer. Beyond the technical details, the integration of SDCC is a demonstration of the maturity of the project and of the ability to collaborate with other groups of developers.

Despite being a Small-C descendant, Z88DK compilers (*SCCZ80* and *SDCC*) are mostly ANSI compliant and include features that were not present in the original Small-C such as function pointers and floating-point arithmetic. Z88DK provides cross-target libraries: i.e., routines that can be used with the very same interface to build binaries for different systems. A developer may compile its code for different systems without any modification. Compared to other similar projects such as *CC65*, *Z88DK* is by far the largest in terms of supported targets, development activity and library support.

## 4.2 The CC65 Development Kit

CC65 is a complete cross development package for 6502-based systems. It includes a macro assembler, a C compiler and several other tools. It is based on a C compiler that, in the early 1990s was adapted for the Atari 8-bit computers by John R. Dunning. The original C compiler in CC65 is a Small-C descendant, but without most of Small C shortcomings: CC65's compiler is mostly ANSI compliant; it still lacks an implementation of floating-point arithmetic, but it supports function pointers.

CC65, as Z88DK, provides cross-target libraries that can be used by different systems. However, CC65 is a smaller project than Z88DK in terms of number of supported targets, development activity and library support.
## 4.3 Other Actively Maintained 8-bit Cross-Compilers

*Small Device C Compiler (SDCC)* is a retargetable cross-compiler which supports a multitude of legacy and modern 8-bit architectures, including the Z80. Unlike CC65 and Z88DK, SDCC provides very basic and generic C libraries that can be used on all its targets. This means that SDCC routines cannot invoke ROM routines. A modified and optimized version of SDCC is part of the Z88DK development kit.

*CMOC* [29] is, currently, the only actively maintained compiler for systems based on the Motorola 6809 CPU. It is developed by Pierre Sarrazin and features a very limited library for input and output.

*Amsterdam Compiler Kit (ACK)* is a retargetable cross-compiler suite and tool-chain written by Ceriel Jacobs and Andrew Tanenbaum, author of *Minix* [30], which originally used ACK as its native tool-chain. It currently supports various 8-, 16- and 32-bit architectures including the Intel 8080.

## 4.4 Developing for All the 8-bit Systems through Abstractions

All the cross-compilers mentioned above provide a common library and allow writing "universal" code across one architecture, i.e., the same code can be compiled for different systems within the same CPU family.

*CrossLib* [31] extends this concept: it is a universal 8-bit library that, heavily exploiting the C preprocessor, provides a hardware abstraction layer across all 8-bit systems: computers, consoles, handhelds, pocket calculators, etc. Code using only Cross-Lib for input/output can be compiled by different development kits like Z88DK, CC65, CMOC, etc. to produce binaries for nearly any 8-bit system.

The action game *Cross Chase* is an example to demonstrate CrossLib. It is written in ANSI C with CrossLib. Basically, it can be compiled, without any code modification, for nearly all 8-bit architectures of the 1980s, including many Eastern Europe computers such as the Robotron series and the Galaksija.

CrossLib and CrossChase prove the maturity of the above compilers in terms of both ANSI compliance and efficiency. They also demonstrate the technical level reached by the communities behind the development tools that enable us to keep old systems alive.

# 5 Proving the Originality of Some Eastern Europe PCs

The tools described above testify to the creativity and the longevity of the hobbyist movements born around the first PCs. They are still active as international retrocomputing communities. Moreover, thanks to the deep knowledge of the systems gained in the development of such tools and to the hacking techniques they support, it is possible to discover new insights to the history of the original systems. For instance, the origins of the BASIC interpreters loaded in the PC ROMs or shipped as external cartridges, cassettes and disks can be shown. Tracing such relationships may hint to a different level of technological connections within the Eastern Bloc and the West.
## 5.1 BASCK, the BASIC Check Tool

Among the Z88DK tools, BASCK is a utility to support library development. The main use of BASCK is to detect the entry points for BASIC and other firmware routines in computer ROMs. If entry points of common routines are known, then they can be made available through a C library allowing the user's code to call them. Maybe ROM routines are not the best on the performance side, yet relying on them may save memory and coding effort. The main reason for writing the BASCK tool was that documentation on ROM routines was scant and information could be only partially retrieved by disassembling the ROM. As of 2018, the BASCK tool is capable of detecting common ROM or disk routines for multiple Sinclair, Microsoft and HuBasic variants for both the Z80 and 6502 architectures. BASCK is also capable of finding equivalent routines that share the same core logic.

## 5.2 How BASCK Identifies Routines

BASCK uses sets of Sinclair, Microsoft and HuBasic patterns. The patterns are "hard-coded" in the BASCK sources. From this point of view, BASCK is less flexible than other approaches and tools [32] that search for generic partial matches; however, it drastically reduces the chance of false positives.

BASCK scans ROM files and searches for multiple patterns of the portions of the code that call the ROM routines. If it finds one of these patterns, it extracts the address from parameters of calling instructions such as CALL, JP, JR.

BASCK is not meant to tell whether two systems are similar, yet it can be used to detect with high accuracy portions of code that are derived from multiple variants of either Sinclair, Microsoft or HuBasic firmware.

Other methods may be used to test the originality of Eastern Europe PCs. For instance, a common test is to check at start-up whether the command "?A" produces "0" as result, i.e., whether "?" is an alias of "PRINT" and variables (e.g., "A") are initialized to "0." Because these are both peculiar features of Microsoft BASIC, a positive test is considered a clue of a Microsoft BASIC clone. However, on a strict logic, it is only an indication of a Microsoft compatible BASIC, and in fact, late HuBasic ROMs behave like Microsoft BASIC in this respect. The findings obtained by BASCK are more accurate because they depend on the actual implementation of the binary code instead of its external behavior.

## 5.3 BASCK Discoveries

We used BASCK to detect whether one specific BASIC interpreter from Eastern Europe was derived from either Microsoft BASIC, Sinclair BASIC or HuBasic. Using BASCK on multiple Eastern Europe systems, we found, as expected, that most systems either cloned the Microsoft BASIC or the Sinclair BASIC.

However, there are two very notable exceptions: the East German Robotron Z 1013 and the Hungarian HomeLab-2 (Aircomp 16). These systems seem to use original BASIC implementations. Moreover, we can confirm that the Yugoslav Galaksija uses
original code even though its BASIC implementation started as a heavily modified version of Microsoft Level 1 BASIC. The only code from Microsoft Level 1 BASIC left on the Galaksija ROMs are the parser and some floating point routines.

On the other hand, BASCK gives a different result for the Hungarian Primo: we suspect that it uses a derivative of the Microsoft BASIC and not an independent BASIC developed by SZTAKI (Szamitastechnikai Kutato Intezet, Computer Technology Research Institute) as generally claimed (see for instance [28]).

# 6 Conclusions

In this paper we have described the remarkable and maybe unexpected diversity of the galaxy of 8-bit Eastern Europe PCs. We have also shown how today's enthusiasts have built modern development tools for these computers.

These tools allow us to easily write code for these computers for educational, recreational and historical purposes. By using these new tools – by coding, experimenting, disassembling and hacking the old 8-bit computers – it is possible to preserve them for future generations of historians and to discover some of the secrets of these machines. These may hint to bigger technological relationships within the Eastern Bloc and to the West hard to obtain from the archives.

Furthermore, through hacking of old systems, knowledge is preserved about the work of people who were active in the 1980s and, sometimes, are still active in the retrocomputing “scenes” of today. Among the many, we want to thank Henrich Raduska for his historical account on the Czechoslovakian 8-bit computers.

## Appendix. A List of 8-bit Personal Computers Produced in Eastern Europe

<table><thead><tr><th>Model</th><th>CPU</th><th>RAM (KiB)</th><th>Year</th><th>Notes</th></tr></thead><tbody><tr><td colspan="5">1. Do-It-Yourself Projects</td></tr><tr><td>Micro-80</td><td>K580</td><td>64</td><td>1982</td><td>Soviet Union<br>Published by the Radio electronics magazine</td></tr><tr><td>Galaksija</td><td>Z80</td><td>2-54</td><td>1983</td><td>Yugoslavia<br>Published as a special issue by the SAM science magazine</td></tr><tr><td>HomeLab III</td><td>Z80</td><td>64</td><td>1983</td><td>Hungary<br>Sold as a kit</td></tr><tr><td>Irisha</td><td>K580</td><td>4-16</td><td>1985</td><td>Soviet Union<br>Intended as educational computer</td></tr><tr><td>Specialist</td><td>K580</td><td>32-48</td><td>1985</td><td>Soviet Union<br>Published by the Modelist-Constructor magazine</td></tr></tbody></table>
<table><thead><tr><th>Model</th><th>CPU</th><th>RAM (KiB)</th><th>Year</th><th>Notes</th></tr></thead><tbody><tr><td>86RK</td><td>K580</td><td>16-32</td><td>1986</td><td>Soviet Union<br>Successor of Micro-80. Also industrially produced as Microsha, Krista, Electronica</td></tr><tr><td>Orion 128</td><td>K580</td><td>128</td><td>1990</td><td>Soviet Union<br>Published by the Radio electronic magazine<br>Industrially produced in Livny</td></tr></tbody></table>

## 2. Home Computers

<table><tbody><tr><td>JPR-1 (SAPI-1)</td><td>i8080A</td><td>1</td><td>1980</td><td>Czechoslovakia<br>Produced by Tesla</td></tr><tr><td>Galeb, Orao</td><td>6502</td><td>9-64</td><td>1981</td><td>Yugoslavia<br>Produced by PEL Varaždin</td></tr><tr><td>aMIC</td><td>Z80</td><td>16-48</td><td>1982</td><td>Romania<br>Produced by Fabrica de Memorii</td></tr><tr><td>HomeLab II</td><td>Z80</td><td>64</td><td>1982</td><td>Hungary<br>Produced by Personal Agroelektronikai GT<br>as Aircomp 16</td></tr><tr><td>Electronica BK0010</td><td>K1801</td><td>32</td><td>1984</td><td>Soviet Union<br>Developed under the Electronica brand by<br>the NPO research centre. PDP-11 compatible</td></tr><tr><td>C 85/1 (Z 9001),<br>KC87</td><td>U880</td><td></td><td>1984</td><td>German Democratic Republic<br>Produced by VEB Robotron</td></tr><tr><td>KC 85/2 (HC900),<br>/3, /4</td><td>U880</td><td>16-64</td><td>1984</td><td>German Democratic Republic<br>Produced by VEB Mikroelektronik</td></tr><tr><td>Primo A-32, A-48, A-<br>64, B-32, B-48, B-64</td><td>U880</td><td>16-48</td><td>1984</td><td>Hungary<br>Produced by Microkey</td></tr><tr><td>Z1013</td><td>U880</td><td>1-64</td><td>1984</td><td>German Democratic Republic<br>Produced by VEB Robotron</td></tr><tr><td>Ondra</td><td>U880</td><td>64</td><td>1985</td><td>Czechoslovakia<br>Produced by Tesla</td></tr><tr><td>PMD 85, 85-2, 85-<br>2A, 85-3</td><td>MHB8080</td><td>48</td><td>1985</td><td>Czechoslovakia<br>Produced by Tesla</td></tr><tr><td>IQ 151</td><td>MHB8080</td><td>32-64</td><td>1985</td><td>Czechoslovakia<br>Produced by ZPA Nový Bor</td></tr><tr><td>Lola 8</td><td>i8085</td><td>16</td><td>1985</td><td>Yugoslavia<br>Produced by the IvoLola Ribar Institute in<br>Belgrad</td></tr><tr><td>Pecom 32, 64</td><td>CDP1802</td><td>32</td><td>1985</td><td>Yugoslavia<br>Produced by EI Niš</td></tr></tbody></table>
<table><thead><tr><th>Model</th><th>CPU</th><th>RAM (KiB)</th><th>Year</th><th>Notes</th></tr></thead><tbody><tr><td>Elektronika MS-0511</td><td>K1801<br>(2 x)</td><td>64</td><td>1987</td><td>Soviet Union<br>Part of the Electronics MS 0202<br>set of educational facilities<br>PDP-11 compatible</td></tr><tr><td>A5105</td><td>U880</td><td>64-128</td><td>1988</td><td>German Democratic Republic<br>Produced by VEB Robotron</td></tr><tr><td colspan="5"><strong>3. Personal Computers</strong></td></tr><tr><td>Agat-4, -7, -8, -9</td><td>UM6502</td><td>64-256</td><td>1983</td><td>Soviet Union<br>Largely inspired by Apple][. Later models<br>were more successful and mass produced</td></tr><tr><td>IZOT 1030</td><td>i8086</td><td>256-1Mb</td><td>1985</td><td>Bulgaria</td></tr><tr><td>Juku E5101</td><td>K580</td><td>64</td><td>1988</td><td>Soviet Union<br>Educational for schools</td></tr><tr><td colspan="5"><strong>4.1 Clones (miscellanea)</strong></td></tr><tr><td>ABC-80</td><td>Z80</td><td>16-32</td><td>1981</td><td>Hungary<br>Clone of Luxor ABC-80. Built under license</td></tr><tr><td>Meritum I, II</td><td>U880</td><td>16-64</td><td>1983</td><td>Poland<br>Clones of Tandy TRS-80</td></tr><tr><td>HT-1080Z, HT2080Z</td><td>Z80</td><td>16-48</td><td>1983</td><td>Hungary<br>Clones of EACA VideoGenie. Built under<br>license. Tandy TRS-80 compatible</td></tr><tr><td>Pravetz 8D</td><td>6502</td><td>16-48</td><td>1985</td><td>Bulgaria<br>Clone of Tangerine Oric Atmos</td></tr><tr><td>TV-Computer</td><td>Z80</td><td>32-64</td><td>1986</td><td>Hungary<br>Clone of Enterprise. Built under license</td></tr><tr><td>KC Compact</td><td>U880</td><td>64</td><td>1989</td><td>German Democratic Republic<br>Clone of the Amstrad CPC</td></tr><tr><td colspan="5"><strong>4.2 Apple ][] Clones</strong></td></tr><tr><td>Pravetz IMKO-1,<br>Pravetz 82 (IMKO-<br>2), 8M, 8A, 8E, 8C</td><td>6502</td><td>48-1080</td><td>1979</td><td>Bulgaria</td></tr><tr><td>Ivel Ultra, Z3</td><td>6502</td><td>64</td><td>1984</td><td>Yugoslavia<br>Produced by Ivaim Electronika</td></tr><tr><td colspan="5"><strong>4.3 ZX Spectrum Clones</strong></td></tr><tr><td>HC 85, HC 85+, HC<br>88, HC 90, HC 91,<br>HC 2000</td><td>MMN80</td><td>64</td><td>1985</td><td>Romania<br>Produced by ICE Felix</td></tr></tbody></table>
<table><thead><tr><th>Model</th><th>CPU</th><th>RAM (KiB)</th><th>Year</th><th>Notes</th></tr></thead><tbody><tr><td>Elwro 800 Junior, 804 Junior PC</td><td>U880</td><td>64</td><td>1986</td><td>Poland<br>Produced by Elwro for schools</td></tr><tr><td>Didaktik Gama, M, Kompakt</td><td>U880</td><td>48-64</td><td>1987</td><td>Czechoslovakia<br>Produced by Didaktik Skalica</td></tr><tr><td>Pentagon</td><td>Z80</td><td>48-1024</td><td>1989</td><td>Soviet Union<br>Design by Vladimir Drozdov. Manufactured<br>by amateurs</td></tr><tr><td>ZS Scorpion</td><td>Z80</td><td>256-1024</td><td>1994</td><td>Soviet Union<br>Manufactured by Zonov and Co</td></tr></tbody></table>

### 4.4 IBM PC Clones

<table><tbody><tr><td>Pravetz 16, 16E, 16ES, 16T</td><td>i8086/88</td><td>256-512</td><td>1984</td><td>Bulgaria</td></tr><tr><td>Felix PC</td><td>i8086/88</td><td>256-640</td><td>1985</td><td>Romania<br>Produced by ICE Felix</td></tr><tr><td>IZOT 1036C</td><td>CM688</td><td>128-640</td><td>1985</td><td>Bulgaria</td></tr><tr><td>ES PEVM</td><td>KP1810</td><td>128-512</td><td>1986</td><td>Soviet Union<br>Designed by Research Institute of Electronic<br>Computer Machines in Minsk</td></tr><tr><td>Iskra 1030</td><td>KP1810</td><td>640</td><td>1989</td><td>Soviet Union<br>Designed by Elektronmash in Leningrad</td></tr><tr><td>Poisk</td><td>KP1810</td><td>128</td><td>1991</td><td>Soviet Union<br>Designed by Elektronmash in Kiev (not<br>exactly a PC clone)</td></tr></tbody></table>

## References

1. Levy, S.: Hackers: Heroes of the Computer Revolution, Anchor Press / Doubleday (1984).

2. Alberts, G., Oldenziel, R. (eds.): Hacking Europe – From Computer Cultures to Demo-scenes, Springer-Verlag London (2014).

3. Stachniak, Z.: Red Clones: The Soviet Computer Hobby Movement of the 1980s, in IEEE Annals of the History of Computing, Vol. 37, No. 1 (2015).

4. Lewis, R.C.: COCOM: An International Attempt to Control Technology, in Defense Institute of Security Assistance Management Journal (Fall, 1990).

5. Gorshkov, D., Zelenko, G., Ozerov, Y., Popov, S: Personal radio ham's computer Radio-86RK. In Radio. No. 4. p. 24 (1986).

6. Leslie C., Gryczka P.: Ingenuity in Isolation: Poland in the International History of the Internet. In: Kimppa K., Whitehouse D., Kuusela T., Phahlamohlaka J. (eds) ICT and Society. HCC 2014. IFIP Advances in Information and Communication Technology, vol 431. Springer, Berlin, Heidelberg. (2014).

7. Tatarchenko, K.: How Programmable Calculators and a Sci-Fi Story Brought Soviet Teens Into the Digital Age, in: IEEE Spectrum (2018), https://spectrum.ieee.org/tech-
history/silicon-revolution/how-programmable-calculators-and-a-scifi-story-brought-soviet-teens-into-the-digital-age, accessed July 2019.

8. Pentagon: http://speccy.info/Pentagon, accessed July 2019.

9. Scorpion: http://speccy.info/Scorpion, accessed July 2019.

10. Robotron: http://robotron.foerderverein-tsd.de, accessed July 2019.

11. KC-Club, http://www.kcclub.de, accessed July 2019.

12. Höltgen, S.: Resume: Hands-on Retrocomputing, Bochum Freiburg: Projektverlag 2016 (Computerarchäologie 1), p. 184-187 (2016).

13. Merkel, G.: VEB Kombinat Robotron – Ein Kombinat des Ministeriums für Elektrotechnik und Elektronik der DDR, Arbeitsgruppe Industriegeschichte des Stadtarchivs Dresden, Dresden.

14. Die Geschichte der Computertechnik der DDR: http://www.robotrontechnik.de, accessed July 2019.

15. The Home Computer Museum: http://www.homecomputer.de/pages/f_easteurope.html, accessed July 2019.

16. Galaksija, https://web.archive.org/web/20090504112705/http://www.paralax.rs/pr83.htm, accessed July 2019.

17. Malý, M.: Home Computers Behind the Iron Curtain, http://hackaday.com/2014/12/15/, accessed July 2019.

18. Primo: http://primo.homeserver.hu/, last accessed July 2019.

19. MAMEDev.org, http://www.mamedev.org, last accessed July 2019.

20. GalaxyWin: http://emulator.galaksija.org, last accessed July 2019.

21. JKCEMU Emulator: http://www.jens-mueller.org/jkcemu/, last accessed July 2019.

22. Oricutron Emulator: https://github.com/pete-gordon/orictron, last accessed July 2019.

23. FUSE Emulator: http://fuse-emulator.sourceforge.net/, last accessed July 2019.

24. CC65 A Freeware C Compiler for 6502 Based Systems (GitHub repository), http://github.com/cc65/cc65, last accessed July 2019.

25. Z88DK: The Development Kit for over Fifty Z80 Machines (GitHub repository), https://github.com/z88dk/z88dk, last accessed July 2019.

26. SDCC – Small Device C Compiler (Sourceforge repository), http://sdcc.sourceforge.net, last accessed July 2019.

27. Cain, R.: A Small C Compiler for the 8080s, in Dr. Dobb's Journal, n. 45 (May 1980)

28. Tanenbaum, A.S., van Staveren, H., Keizer, E.G., Stevenson, J.W.: A Practical Tool Kit for Making Portable Compilers. in Communications of the ACM. vol. 26 n. 9 (1983)

29. CMOC: https://perso.b2b2c.ca/~sarrazip/dev/cmoc.html, last July 2019.

30. Tanenbaum, A.: https://www.minix3.org/, last accessed July 2019.

31. Caruso, F.: Cross Chase: A Massively 8-Bit Multi-System Game, in Call A.P.P.L.E., Vol. 28, No. 1 (2018).

32. Manber, U.: Finding Similar Files in a Large File System, in Proceedings of the USENIX Winter 1994 Technical Conference on USENIX Winter 1994 Technical Conference, 1994.