ZXAS was a machine-code assembler for the 16K ZX81, sold on cassette by Bug-Byte of Liverpool from autumn 1981. An assembler lets a programmer write the processor’s instructions as short mnemonics such as LD A,H, “load the accumulator with the contents of the H register”, and turns them into the numbers the Z80 actually runs; LD A,H is 124. Without one, a ZX81 owner who wanted machine code worked out those numbers by hand and POKEd them into memory a byte at a time, a method Sinclair User called “highly error-prone and time-consuming if the program is substantial”. Bug-Byte’s advertisements promised the real thing on a £70 computer: “Although many people have expressed disbelief, we assure you that this is a full-specification Z80 assembler.”
Fast facts
- Publisher: Bug-Byte, 98–100 The Albany, Old Hall Street, Liverpool.
- Machine: 16K ZX81, and a ZX80 fitted with the 8K ROM.
- Size: 5K of machine code.
- Price: £3.95 in October 1981; £5 by 1982.
- Companion: ZXDB, a disassembler and debugger, £5.95 at launch and £6.50 by July 1982.
How you used it
ZXAS was 5K of machine code driven by a few lines of BASIC. When it started, it reset RAMTOP, the address marking the top of the memory BASIC may use, and loaded itself above it. That kept it out of the way of the BASIC program in which you wrote your assembly source, so the source could be saved and loaded on its own.
The source went into REM statements, the ZX81’s comment lines, which BASIC ignores when it runs a program:
- several instructions to a line, separated by semicolons;
- up to 256 labels, written
:L0to:L255; - comments after a
*; - numbers in decimal or hex;
- full stops instead of commas, so
LD A,Hwas typedLD A.H, which Sinclair User said “makes typing instructions easier”.
When you ran the assembler it asked where to put the finished machine code. Sinclair User’s reviewer, Phil Garrett, usually put a REM statement at the start of the program and assembled into it from address 16514, the first byte inside that first REM. The assembler then listed every line on screen as source line number, address in hex, opcode and data in hex, and the Z80 mnemonic. If it found an error, it stopped with an error code.
ZXDB
Bug-Byte sold ZXDB as ZXAS’s “perfect complement”. Besides a full disassembler, which turns machine code back into mnemonics, its advertisements listed single-step routines, string search, block transfer and a hex loader, and said that with ZXAS also in memory it still left about 8K free.
Garrett recorded two quirks. ZXDB occupied 4K from 16514 and worked entirely in hex. It could not send output to a printer, but you could get round that by disassembling a dozen lines or so and then calling 0869H, the Sinclair ROM’s COPY routine, which dumped the screen to the ZX Printer. And some of the mnemonics it printed came from Intel’s 8080 instead of the Z80, so LD A,(HL) appeared as LD A,M.
What the press made of it
Your Computer’s survey of ZX81 cassettes in February 1982 called ZXAS “a powerful ZX-81 assembler” and “this superb product”, which “accepts the standard Zilog mnemonics with decimal or hexadecimal values”.
In July 1982 Sinclair User ran Garrett’s survey of ZX81 machine-code tools. He opened with his own reason for caring: a three-dimensional noughts and crosses program he had written in BASIC on a ZX80 took 45 seconds to reply to each move. Rewritten in machine code on a ZX81, it replied in less than half a second, though writing it had taken “eight complete days of my summer holiday”.
ZXAS came out well. Garrett called it “a remarkable program” and “excellent value at £5”, and found one bug: SUB A,n did not assemble, but AND A; SBC A,n, which clears the carry flag and then subtracts, did the same job. The only other ZX81 assembler he had found was ACS Software’s, similar in size and operation at £5.50, and he summed up both: “the use of either this program or ZXAS is the single biggest step to proficiency in machine code programming.” He added a warning: “Neither program sets out to teach assembler, so a book will also be needed.”
His survey also shows how many tools a ZX81 programmer could already buy. Alongside the assemblers he looked at Campbell Systems’ 4K disassembler (£4), a 14K disassembler from the Aylesbury ZX Computer Club (£3.50), MicroGen’s Debug (£3.95), an ACS debugging monitor to go with its assembler (£5.50), Picturesque’s ZX-MC monitor (£7.50) and the Taurus Machine Code Monitor (£7.50 on cassette).
A year later Sinclair User named ZXAS as one of the two best-selling ZX81 assemblers, with Artic Computing’s, and said Bug-Byte had launched it “in a blaze of publicity as being the first machine code assembler for the ZX-81”. Both companies, it said, “built their reputations with these assemblers”.
Bug-Byte afterwards
Bug-Byte went on to publish Spectrum games, and in 1983 it released Manic Miner. The Bug-Byte entry tells that story.
Sources
- Your Computer, October 1981: Bug-Byte advertisement (ZXAS for the 16K ZX81 and 8K ROM ZX80, 5K, £3.95; ZXDB “new release”, £5.95).
- Computer and Video Games issue 1, November 1981: Bug-Byte advertisement for ZXAS and ZXDB.
- Your Computer, December 1981: Bug-Byte advertisement (“a full-specification Z80 assembler”; ZXDB’s single-step routines, string search, block transfer and hex loader, and about 8K left free).
- Computer and Video Games issue 4, February 1982: Bug-Byte advertisement listing the ZXAS assembler (16K) at £5.00.
- Your Computer, February 1982: survey of ZX81 cassettes, ZXAS entry.
- Phil Garrett, “Aids for speed and efficiency”, Sinclair User issue 4, July 1982, pp. 41–42: POKEing machine code, the noughts and crosses program, how ZXAS works, the
SUBbug, the ACS assembler, ZXDB (4K, hex,COPYat 0869H, 8080 mnemonics, £6.50) and the other disassemblers and monitors with their prices. - Sinclair User issue 16, July 1983: survey of assemblers (ZXAS and Artic’s assembler as best-sellers; “the first machine code assembler for the ZX-81”).