ZX-MC
· ZX81 16K · 1 players
Picturesque · Pound sterling 7.50
Not archived (available elsewhere) Held by another archive rather than this one, so the files link out.
Discussion
Nobody has started a thread about this yet.
Files and rights
No permission is on record either way. Screens and pictures are copied here on a take-down basis: if you hold the rights and want something removed, say so and it goes.
Credits
- Picturesquecredited
Sign in to credit somebody, or say what these people did.
In the magazines 10
Sinclair User #4Jul 1982 · p.41
Phil Garrett
AIDS FOR SPEED AND EFFICIENCY The popularity of writing in machine code is growing, Phil Garrett looks at the systems which can help. Judging by the popularity of Space Invader-type arcade games for the ZX-81, and of books such as Toni Baker's Mastering machine code on your ZX-81, it seems the ZX-81 owners want not only to run machine code programs but write them, too, That is scarcely surprising, considering the tremendous speed and efficiency of a machine code program compared to Basic, but there is a trade-off involved. I wrote a three-dimensional Noughts and Crosses program for my ZX-80 which played a good game but had a response time of 45 seconds, A year later I wrote the same program in machine code on my ZX-81 and it had a response time of less than half a second, Writing that program, however, had taken eight complete days of my summer holiday. Broadly speaking, there are three types of program available to aid the budding machine code adventurer, The most complex and probably most useful programs are the assemblers, which convert mnemonics into machine code; then there are disassemblers which do the reverse and, finally, monitor programs which allow close examination of a machine code program as it runs, plus other functions, When Zilog produced the Z-80 microprocessor, each of its hundreds of instructions was given a mnemonic so that users could remember what a particular instruction would do, For example, LD A, H means load the Accumulator with the contents of the H register and represents 124 in machine code, The mnemonic is entirely arbitrary and could just as well have been LOAD A FROM H. We could produce a machine code program by POKEing instructions byte by byte into RAM and plenty of machine code loader programs do just that, The method, though, is highly error-prone and time-consuming if the program is substantial, On the other hand, an assembler program converts the mnemonic form of instructions - which we can understand reasonably easily - into machine code which the microprocessor can understand and execute. In some ways the assembler program is similar to the Basic ROM in the ZX-81, The ROM scans the program for Basic keywords - LD, CALL - and then places the corresponding instruction in the RAM. The ability to use labels makes an assembler very powerful, as it allows the programmer to refer to instruction lines, subroutines, and even date by means of symbols, rather than having to determine the addresses each time. Sufficient of the theory; how are the ZX-81 assemblers used? BugBytes ZXAS assembler is in 5K of machine code, with a few lines of Basic to operate it, The program resets RAMTOP automatically and loads itself above it, so that assembler source programs can be loaded and saved separately, Lines of mnemonics are entered in REM statements, with multiple instructions allowed, provided they are separated by semi-colons, Up to 256 labels can be used in the form :L0 to :L255, and comments may be placed after a "*", Full-stops are used instead of commas - e.g, LD A, H - which makes typing instructions easier and numbers may be entered in decimal or hex, When the assembler is run, you are prompted for the starting address for the resulting machine code, Invariably I use a REM statement at the start of the program, and compile the machine code from 16514, The assembler code is then displayed on the screen in the format source line number: address (in hex): opcode and data (in hex); Z-8O mnemonic, If there is an error, the assembler stops with an error code, so it is not difficult to build a syntactically-correct source program. There is at least one bug in ZXAS: the SUB A,n instruction does not work but it can be replaced by AND A; SBC A,n which does the same, ZXAS is a remarkable program and is excellent value at £5. The only other ZX-81 assembler I have encountered is produced by ACS Software, It is similar to ZXAS in size and operation, with instructions entered in REM statements and labels available in the form Q.1: Q.255:. Data must be entered in decimal rather than hex - I prefer decimal - and there is a useful DFB function which allows you to specify the contents of a particular byte during assembly, so you can have messages embedded in your machine code. The assembled listing display is slightly different from ZXAS; you are given the decimal address, hex opcode and data, and then the mnemonic. The ACS assembler is also excellent value at £5.50 and the use of either this program or ZXAS is the single biggest step to proficiency in machine code programming. Neither program sets out to teach assembler, so a book will also be needed, I use the thorough but expensive Programming the Z-80 by Rodney Zaks but there are now several books available specifically for machine code programming on the ZX-81. Disassemblers convert machine code into mnemonics, making it easier to analyse and amend, The ACS disassembler can be used at the same time as its assembler and provides mnemonic listings in the same format, All addresses are shown in decimal and destination addresses are shown for relative jumps rather than the displacement, which is an excellent idea. All the other disassemblers have additional bells and whistles to assist with editing and debugging machine code, Campbell Systems 4K disassembler uses plenty of Basic and its machine code occupies my favourite 16514 onwards area of RAM, It has a handy facility to step backwards and displays contents in hex, with addresses and mnemonics in decimal, You cannot dump direct to the printer and you have to use the break key to return to Basic, Machine code can be entered, and individual bytes changed, using hex, This program, price £4, has been available since June, 1981 and has perhaps been superceded by some of the others on the market. The Aylesbury ZX Computer Club has decided courageously to enter the software fray with its disassembler, It is a very large program (14K) and runs a little slower than the others, The display, which can go to screen, printer, or both, is unusual; addresses, contents and mnemonic data are given in both hex and decimal and the display allows one line for each byte, There is also a facility to enter machine code from address 30000 in either hex or decimal and an Edit function to alter a byte or copy a block of bytes from one area of RAM to another, It is good value at £3.50 plus 50 pence for postage and packing. Bug-Bytes ZXDB disassembler can be used in conjunction with its ZXAS assembler and occupies 4K from address 16514, It works entirely in hex and does not dump to the printer, although you can circumvent that by disassembling 12 lines or so, then calling 0869H, which is the Sinclair ROM COPY subroutine. Another disadvantage is that some of the mnemonics belong to the 8080 rather than the Z-80, e.g., LD A, (HL) appears as LD A,M, It has a very large number of sophisticated monitor functions, so I have included it among the monitors as well, ZXDB costs £6.50. MicroGen Debug is also a disassembler with some monitor functions, works entirely in hex, and can be used with a printer, Care has to be taken when transferring from Basic to Debug and back, or the ZX-81 will crash, I found the monitor display impressive, although more detailed instructions would have been helpful, The program lives above RAMTOP, which it re-sets automatically, and costs £3.95. ACS-Debug can be used in conjunction with the ACS assembler and disassembler to provide a complete, if rather expensive, machine code writing package, It stores above RAMTOP, uses decimal numbers only, and does not dump to the printer, Once again, it costs £5.50. The Picturesque ZX-MC is another sophisticated monitor; it is rather like a separate operating system, You cannot use it with any existing machine code programs, as it uses low memory and has its own stack in high memory, It has its own loading and saving routines which operate at twice the speed of the ZX-81, The program is complete with a comprehensive manual for £7.50 but I believe its incompatibility with other programs is a serious disadvantage. The Taurus Machine Code Monitor is placed above RAMTOP and is available as a cassette and also in EPROM form as part of its 16K RAM pack system, With the letter you can switch from 14K RAM plus 2K monitor to the full 16K RAM, Apart from the usual functions, it has a helpful hex calculator and a facility to create REM statements of any length, It also has a comprehensive manual at £7.50 in cassette form, and the RAM-pack system costs £48. Bug-Byte, [redacted]. ACS, [redacted]. Campbell Systems, [redacted]. Aylesbury ZX Computer Club, [redacted]. MicroGen, [redacted]. Picturesque, [redacted]. Taurus, [redacted].
"In some ways the assembler is similar to the Basic ROM in the ZX-81."
"There is a trade-off between the speed of the final program and the time taken to write it."
Sinclair User #1Apr 1982 · p.8
MACHINE CODE MONITOR The program allows you to write machine code, SAVE and LOAD it at double speed. It provides breakpoints in your routines, so that you can find the results so far as a check as to why your program crashes. The monitor takes up 3.5K of space on a 16K RAM pack. The 32-page manual with the cassette will show you how to ENTER, RUN and DEBUG your machine code routines independent of Basic. The Screen Kit 1 by the same firm allows you to create and load data files from cassette from within a program. That can be very useful as it can swap the Basic variables for the same program. A new SCROLL is included which will move the screen, up, down, right or left. The ZX-MC with manual costs £6.50 and the Screen Kit 1 £4.95. Both cassettes are available from Picturesque, [redacted].
Advert7
- Sinclair User #8Nov 1982 · p.36
- Sinclair User #7Oct 1982 · p.35
- Sinclair User #6Sep 1982 · p.40
- Sinclair User #5Aug 1982 · p.60
- Sinclair User #4Jul 1982 · p.58
- Sinclair User #3Jun 1982 · p.6
- Sinclair User #2May 1982 · p.39
Feature1
- Sinclair User #4Jul 1982 · p.42
Related
- Elsewhere
- ZX81 Stuff
- Same entry at
- Spectrum ComputingZXInfo
Reviews from people here
Sign in to write about this, or make an account. It takes a minute and lets you correct the catalogue too.
No year, genre, language, description, tag recorded.
Sign in to correct or add to this.
Hold the rights to this and want it taken down?