Amiga Format
This article was originally written by Simon N Goodwin for Amiga Format magazine, and is used by permission of the joint copyright holders. It should not be copied any further without written permission. The free emulators mentioned were included on the accompanying CD with the magazine, and are generally available - often in updated form - from this site. The text is as originally submitted to the magazine - which means there are some differences, mostly extra text which was cut to fit into the pages available - with the addition of hyperlinks to new or updated information which has since become available. This approach has been taken to preserve the structure of the original series, while making new information readily available. Simon welcomes comments from readers, care of Tomas Amsrud, who has generously prepared the material for publication on the Internet.


Qdos - The Quantum Leap?

Simon N Goodwin emulates the British operating system
that introduced many Amiga developers to the 68000.

Qdos is the operating system of the Sinclair Quantum Leap (see here). It's a PD replacement for Amigados, actively supported by groups worldwide, particularly in the UK, Germany and USA. It's fast, as QLs and Amigas use the same types of processor; original QLs used Motorola's slowest model.

Amiga Qdos is currently at version 3.23. First developed by Rainer Kowallik of Berlin, it's been much improved by Mark Swift of Manchester, with a few contributions from your humble scribe. It comes on three floppy disks. Two are in 880K Amiga format: a program disk and another containing complete source code. The third is a 720K disk in Qdos format, packed with programs and examples. The name comes from QL and DOS (strictly Drive Operating System, as original QLs had no disks) and is a pun on the Greek word Kudos - the pride that comes before a fall!

The Amiga package is extraordinarily complete. It includes a PD assembler, editor and linker, as well as a handler to read and write Qdos disks. You can rebuild the entire system by clicking on icons in the 'make' directory on the source disk. It runs on all Amigas, from A500s with Workbench 1.3 to the latest A4000/060s. The emulator supports serial and parallel ports, graphics, sound and up to four floppy drives.

These days Qdos also runs on Atari and PC hardware, with add-on cards, although software-only emulators are in development. Amiga Qdos is the only genuinely PD version, although there's a shareware Qdos emulator for fast Apple Macs.

Qdos software is abundant, with hundreds of PD disks in circulation; most run on Amigas, but some need to be patched with utilities on the Amiga Qdos support disk to cope with 32 bit expanded memory and a design fault which stops Motorola's TAS instruction from working on Amiga hardware.

Using Qdos

Qdos was the first multi-tasking operating system for home computers, and has a few rough edges. Almost everything is done from the keyboard, although Amiga Qdos includes a mouse driver, used by some of the example programs. The most important control keys are Control F5, to pause display updates, Control C to swap input from one task to another, and Control Space to interrupt SuperBASIC, the built-in programming language.

LOAD and LRUN load SuperBASIC programs, with names usually ending _BAS, and EXEC starts tasks. Devices are named FLP1, FLP2 and so on, and the separator is an underscore rather than a dot, so you start Xchange with the command: EXEC FLP1_XCHANGE. The format of file names is flexible, but they must be enclosed in quotes if they contain unusual characters.

Fleet Fleet The Qdos equivalent of startup-sequence is a SuperBASIC BOOT file, launched with LRUN FLP1_BOOT, or by resetting the emulator (CTRL-ALT-SHIFT-TAB) with a disk in the drive, then pressing F1 or F2 to select High Resolution MODE 4, or LowRes, MODE 8, respectively.

High resolution displays are converted using the Amiga's blitter. You can accelerate systems with chip RAM only by reducing the blitter priority, at a cost of some flicker as the red and green bitplanes are updated separately. SCR_PRIORITY 8,1 gives fastest updates, but SCR_PRIORITY 2,1 leaves more time for the processor on an unexpanded Amiga. With a 68030 or better you can use the processor instead of the blitter, giving better updates but slower emulation. This replacement screen driver, ACE, supports low resolution displays in eight colours, otherwise emulated with four colour stipple patterns in blitter mode.

Qdos supports multiple windows, with scaled and clipped graphics, but it's up to applications to update them when they overlap; pressing F10 or F4 usually does the trick. You can't swap keyboard control to a task, unless it displays a cursor. Older programs, particularly games, may not be designed to multi-task and should be started with the EXEC_W command (W for Wait).

For lots more details of SuperBASIC commands and functions, check out the documentation on the Amiga Qdos system disk, join the user group Quanta, search the web, or seek out tutorial files from QL PD libraries.

Sinclair's Quantum Leap

Sinclair's Quantum Leap, or QL, was launched at 400 in January 1984, and delivered in June. It was the first home computer based on a 68000-series processor - the 7.5 MHz 68008 - and shipped with 128K RAM and 48K ROM, expandible to 640K and 64K respectively. It has two serial ports, networking, and two 100K tape cartridge 'microdrives'. Display resolution is 512x256 in four colours, or 256x256x8.

QL QLs were manufactured by Thorn EMI in the UK and Samsung in Korea, for export to Germany and the USA. The ROM contains a block-structured extensible language, SuperBASIC, designed by Jan Jones, and Tony Tebby's Qdos, a multi-tasking, device independent operating system modelled on Unix. London's Psion contributed a business software suite which was advanced for the time, though slow running from microdrive tapes.

Microdrives were a compromise to keep the price down - in 1984 floppy drives were prohibitively expensive, although today they're the choice of almost all Qdos users. Microdrive tape loops had a 16K per second transfer rate but slow access times, averaging 3.5 seconds. To mitigate this Qdos uses all spare memory for 'slave blocks' - 512 byte buffers for recently read data. This works much better than the Amiga 'addbuffers' arrangement.

Current expanded QLs have 720K, 1.44 or 3.2 Mb floppy drives, faster processors - usually 68000/16 or 68020/24 - and multi-megabyte RAM expansion. A range of 'Thor' SuperQLs with 68000 and 68020 processors was manufactured in the UK and Denmark in the late 1980s. These came with Psion Xchange - an improved, integrated version of the business software, first bundled with 'One Per Desk' workstations, QL derivatives marketed by ICL and BT. Hardware Qdos emulators run on Atari ST, TT - and even IBM clones, via a 300 ISA card with a 68EC040 processor and 4 Mb RAM!

Emulators for Qdos

Qdos is popular with programmers and has more than its fair share of emulators. Many are out-classed by Amiga-specific programs, but some deserve attention as they mimic machines which cannot otherwise be emulated on an Amiga.


Xtricator is a Sinclair ZX81 emulator from the Netherlands. It runs well on Amiga Qdos. You can adjust the priority of the screen and Z80 interpreter to get it working at a sensible speed on most Amiga systems from A1200 upwards. On a 68060 system it ran almost 26 times faster than the real thing, albeit at considerably more expense...

It runs just right on A4000/030s if you reduce the main Xtricator task priority to half that of the XTR_IO screen-update task, and gobble up some CPU time by boosting the Qdos screen:


Sinclair's ZX81 was the first home computer mass-marketed at a price below 100, and sold millions worldwide. It was very slow, as the processor was used to generate the display, and had just 1K of memory, but it's fondly regarded by many for whom it was the first step into home computing. Xtricator is the only ZX81 emulator that runs on the Amiga, and it requires Amiga Qdos - but that's no problem as both work well and are freely distributable.

Xtricator has enormous advantages over the real thing, like fast disk loading and saving, multi-tasking and support for up to 48K RAM. CBI, an extended BASIC toolkit, is built in, and it even runs 'hires' games which re-programmed the ZX81 display on the fly to get around the limitations of simple character graphics. A substantial library of ZX81 programs is available in Xtricator format from the author Carlo Delhez, on registration of the shareware version.


Spectator is a Sinclair Spectrum emulator from the same stable. It's slower than Amiga ZX emulators, but more compatible as it emulates the later Spectrum 128 and Interface 1 (serial port and microdrive expansion) as well as the basic 48K Spectrum. It supports three file formats - the compressed Z80 format, used by many Spectrum emulators, its own microdrive image format, since adopted by Gerton Lunter's Z80 for PCs, and SPT tape format. Files are readily available on CD and the net, particularly as Z80 snapshots.

The main weakness of Spectator is its sloth, particularly in 128K mode, and lack of emulation of Spectrum 128 sound, which does not translate well to Qdos BEEPs. If that's a priority you're better off with the Amiga-specific ZXAM, which emulates Spectrum 128 sound well, but doesn't support more than 48K of RAM yet.

The shareware version of Spectator on the AF CD runs about 2.5 times the speed of the real thing on a 68060 Amiga, but substantially slower on an A4000/030. You can boost it by switching from the CPU-intensive eight colour display to a four colour blitter version, with these commands:


On a 68060, in 48K mode, the problem is an excess of speed, rather than a dearth. I dragged it down to 100 per cent Spectrum speed with these commands:


Bizarrely, Spectator 1.52 thinks it's running on a machine with a German keymap, transposing the letters Z and Y. You can get around that, perversely, by selecting a German map for Amiga Qdos with the command KEYDT - which means everything gets swapped twice, back to the UK format. Use KEYUK to swap back when you're in SuperBASIC.


ZM/HT is currently the only emulator that TRANSLATES programs as it runs, reading Z80 code and generating corresponding 68000 routines. This means that it's potentially much the fastest Z80 emulator; Spectrum program speeds increase as ZM/HT compiles them into native 68000 code, to the point where a 16 MHz 68000 can out-run a real Spectrum! Given plenty of disk space you can save compiled code along with the original, for a quick start when you reload.

ZM/HT avoids the overhead of decoding and looking up each Z80 instruction whenever it is encountered. At first it's slow because it must generate new 68000 routines as well as execute them, but later it can run pure 68000 code, only returning to the Z80 interpreter when it runs out of space for 68000 code or hits an instruction that it has not yet translated.

Put that way ZM/HT sounds simple, but it has to be fiendishly clever to cope with self-modifying programs, which may poke their own code at any time. It keeps a table with an entry for every byte of emulated memory, marking routines for re-compilation when they are modified. It's complicated but if it can be done in Qdos, an Amiga version is surely possible.

This is probably the only way we'll see fast PC emulation on current Amigas. In practice it's a technique more suited to eight bit than 16 bit emulation, because it demands several bytes of emulation memory for every byte emulated. The compiled code is much longer than the Z80 original, as 68000 code is relatively verbose and optimised for speed, rather than size. But the speed is so impressive, compared with a processor interpreter, that compiling emulators are surely the way of the future.

The rest

There are many more emulators for Qdos, both commercial and freely distributable. CPMulator, Solution, Success and Conqueror emulate business bogey-systems CP/M and MSDOS. Other Spectrum emulators include William James' Speculator 93, interesting as it's the parent of Amiga Speculator, with full 68000 source code. ZM/1, ZM/2 and ZM/3 come from Ergon of Italy, authors of ZM/HT; they are feature-packed but relatively slow Z80 interpreters, rather than compilers.

Qdos software

Many Amiga developers were introduced to the 68000 by the QL, including HiSoft, RealTime Games and the Bitmap Brothers. Metacomco's infamous Amiga ED and BCPL compilers were early QL products. HiSoft BASIC, Devpac 1 and 2 started life on Qdos. Much recent commercial software uses QPTR, a WIMP package from Tony Tebby - beware, as this is not included with the emulator, and not all versions run on Amiga Qdos. Tebby has written a Qdos update, SMS/Q, for Atari, PC and expanded QL hardware.

Most older programs work directly from the SuperBASIC command line, with no need for extensions, but some expect commands from SuperToolkit 2, an extension package originally supplied as a 16K ROM. This works from RAM on the Amiga. Hundreds of alternative commands are available, including the PD Toolkit on the Amiga Qdos support disk, and DIY Toolkit routines on our CD.

Such toolkits are very important on Qdos because they extend SuperBASIC in a concise, powerful way. They're a bit like resident commands on the Amiga, but faster and more flexible. Many programs are written in SuperBASIC, using toolkit extensions where necessary, and compiled into stand-alone tasks which link to toolkits as they load.

Qdos Qlassics

There are far too many PD Qdos programs to list them all here,
let alone discuss them in detail - but here are a few highlights from the AF cover CD.

Psion Xchange
Psion's Xchange suite was one of the great strengths of the QL. It comes on the support disk and works nicely under Amiga Qdos. It's well-organised, with menus and context sensitive help, and well-integrated for moving data between packages. The Archive database is powerful but sluggish. Archive programs resemble Psion's later OPL (Organiser Programming Language). Easel is a quick way to boil up convincing bar and pie charts. Abacus is a friendly spreadsheet with powerful functions. Cells can have meaningful names like Sales.July rather than AC21.

Fleet Quill is a WYSIWYG word-processor, but only supports monospaced text. It uses its own proprietary _DOC format, which you can convert to RTF (Rich Text) which Final Writer 5 can read, using Aminet's UTIL/CONV/DOC2RTF tool or QL code on the support disk: DOC2RTF_BAS and DOC2RTF_TASK, the much taster multi-tasking compiled version. QL programs and plain text files are easily readable from the Amiga as the line-ends correspond, although foreign accent codes differ.

Molecular Graphics
Mark Knight's Molecular Graphics is a 3D animation package with a database of over a hundred interesting molecules which you can tumble in colour around the screen. It's a great way to understand the 3D structure of chemicals, which can be hard to picture from two-dimensional drawings. The package includes a molecule editor so you can add to its database and admire your own designer drugs. It's a simple program, well-implemented and fun to use. It's freely distributable, and surprisingly nothing like it is available on the Amiga. But it runs fine with Amiga Qdos, so who cares?
C68 is a freely-distributable Qdos C compiler and development system. Full source code is available - in C, naturally - plus lots of useful utilities. C68 generates code for all 68000-series processors, and has been used to compile many PD and commercial Qdos releases. If you're interested in C, but cannot afford one of the commercial Amiga packages, C68 lets you try the full language at no cost.

Fleet Tactical Command
If Elite was the game that made the BBC Micro, Fleet Tactical Command is the Qdos equivalent. The graphics are simple 3D wire-frames, but they belie the depth and complexity of the game. FTC has been described as 'a real -time simulator where you play the entire navy', in an ocean a million square kilometres in size.

Vessels include tankers, submarines and supply ships as well as cruisers and destroyers. All the ships move simultaneously and send messages which flash up as you play. You steer, fire weapons and issue detailed guidance from the keyboard. You can swap ships at any time, and see the others in a 3D view or on your radar screen. Courses can be set by dead reckoning or Fleet using the 'IFF computer' which tells you the range and bearing between vessels. The game simulates crew activities, damage control, docking and re -supply as well as combat.

Tides, currents and weather all play their part, and it takes a while just getting the whole fleet heading the same way without collisions, let alone engaging the enemy - but it's great fun, especially as a two player game. A demo version of Fleet Tactical Command, limited to 90 minutes playing time, is on the AF Cover CD. Full versions run on Qdos and Msdos-compatibles.

Pros and Cons

If you're a programmer or former QL owner, Amiga Qdos is fun and fascinating, but it's a bit much for keyboard-shy lamers. Hackers welcome it as a stable platform for Amiga hardware-banging. Examples on the support disk show how easy it is to use the Amiga blitter, stereo sound, palette and even SCSI devices when there's no system getting in the way. The source files contain a wealth of useful assembler routines.

Qdos runs sweetly on floppy-only Amigas, but currently only supports hard drives via rare PC bridgeboards. Rather than write drivers for every interface under the sun the developers aim to get the next version running alongside Amigados, using Amiga drivers. This will be a big job, but a massive step forward.

CD Goodies

Some of the best Qdos PD is on our cover CD. To use it, copy the contents of each directory onto a double density disk in Qdos format. You'll need the Qdos handler loaded, either by booting from the Amiga Qdos startup disk or by copying the handler to your system partition. On Workbench 2 or 3, just copy Frank Swift's QLFileSystem from the boot disk into L: and icons for each drive into DEVS:DOSDRIVERS.

By default QLFileSystem uses 'mfm.device', part of CrossDos, to read disk tracks and sectors. Workbench 1.3 Amiga users can use the PD 'messydisk.device' instead. Copy it from DEVS: on the boot disk to your own system, and add this command to your startup-sequence:


Substitute PC for QL to gain access to 720K PC and Atari disks. The only snag is that Messydisk, like the emulator itself, cannot read High Density 1.44 Mb media. This hardly matters as Qdos PD and commercial releases invariably come in 720K double-density format, which any Amiga can read.

Once you've re-booted with the handler in place you should see an extra icon on your workbench, marked QL0:????. This is the equivalent of the CrossDos icon PC0:???? and shows the Qdos disk name as soon as one is inserted.

Click on the icon and format a fresh disk from your workbench, just like a floppy in Amiga or PC format; alternatively, use Opus or the Shell. The physical format has nine sectors per track, or 18 for high density, like PC and ST disks, so you can use FORMAT QUICK to put Qdos directories onto disks already in those formats.

Once formatted you can use any Amiga program (e.g. DirWork, SID, Opus, Shell or Workbench) to copy files from the CD to the Qdos floppy. Qdos file names can have up to 36 characters - four more than Amiga names - so very long names may be truncated when you copy from QL to Amiga media. Sub -directories are supported from the Amiga side, but not within Amiga Qdos; copy files out to the root before trying to use them in the emulator.

Qdos tasks have extra information in their 'comment' field. Make sure that this is copied as well as the file bytes, or Qdos will not know how much space to allocate for the task's data. If this happens to you, the task will be rejected with a 'bad parameter' report when you try to EXEC it.

Qdos contacts:
PD suppliers:

SJPD, 36 Eldwick Street, Burnley, Lancashire BB10 3DZ, UK; 01282 451854. Qubbesoft PD, Brunwin Road, Rayne, Braintree, Essex CM7 5BU, UK; 01376 347852.

Both stock Amiga Qdos 3.23 (3 disks, 3.50) and hundreds of disks of PD. International QL User Group: Quanta, 213 Manor Road, Benfleet, Essex SS7 4JD, UK.

Bulletin Boards:
TF Services: 01344 890987
Nene Valley: 01933 460538
Net newsgroups:
General Sinclair: comp.sys.sinclair
Qdos discussion:
C68 compiler: maus.sys.ql.c68-int

Web pages:

Qdos FTP:

Web page design Copyright © Tomas Amsrud
Articles Copyright 1996-2002 © Simon Goodwin