Spectrum+2: Machine Language for the Absolute Beginner
Book: Paperback · English
Melbourne House · 1986 · Pound sterling 8.95 · 190 pages · ISBN 0-86161-209-4
Discussion
Nobody has started a thread about this yet.
Documents
- Spectrum%20%2B2%20Machine%20Language%20%28Joe%20Pritchard%29.pdfComplete book English
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
- Joe Pritchardcredited
Sign in to credit somebody, or say what these people did.
In the magazines 4
ZX Computing #35Mar 1987 · p.65
Carol Brooksbank
Melbourne House £8.95 This book contains the best and clearest explanation of the Z80 instructions that I have ever come across. In that respect it is an excellent book for the beginner, but the author seems to have forgotten that the newcomer to machine code also needs to be shown how to string the instructions together to make the computer actually do something. The book is peppered with short routines, but most of them simply show that if you load a couple of registers with numbers and add or subtract them, you get the right answers. The beginner might be forgiven for thinking that you could do most of this in half the time with a calculator. There is an excellent chapter on hex, binary and decimal arithmetic, and it shows clearly how to calculate the conversions from one to the other, which is just as well. Most of the examples are in decimal, there is a decimal loader and no hex loader, but the tables of opcodes and instructions are in hex and there is no conversion table. It seems a certain recipe for disaster to expect the beginner to calculate conversions between conventions. There is a splendid chapter on interrupts which makes the use of vector addresses absolutely clear, but again the examples only show how to add 1 to a variable on every interrupt, and the chapter ends by saying that 'there are other things you can achieve with interrupt driven routines, but they need some programming experience.' The author skates briefly over keyboard reading and printing to the screen, but the chapter on sound makes the whole book worthwhile. At last we are given routines which achieve something and show the reader how to build on the examples to make their own routines. This chapter, and the sections on memory paging, will be useful to anyone, even the more experienced machine code user, who is new to the 128K and +2. Despite the title, I think Joe Pritchard is more familiar with the 128K model, because he talks of amplifying the sound via the ear/mic sockets which, of course, the +2 does not have, and there is no mention of the +2's sound socket. If you are new to the 128K or +2, then get this book. If you are a machine code novice, buy it for its clarity, but get another at the same time with better examples. This one tells you all about Z80 instructions but nothing much about programming.
Crash #38Mar 1987 · p.86
Simon N Goodwin
(Simon N Goodwin owns the copyright to this review. Please visit http://simon.mooli.org.uk to find original articles and updates, much new material and his contact details.) The Spectrum manuals explain how to program in BASIC, but tell you next to nothing about machine code - the language used to program most commercial games. This month I've looked at a new book from MELBOURNE HOUSE which promises to teach machine code to the 'absolute beginner'. Last month I reviewed HISOFT's BASIC compiler - a program that translates BASIC into machine code, the fastest code the Spectrum can handle and the code used for virtually all commercial games. Compilers will speed up BASIC, but they don't let you add much to the language, and - at least on the Z80 - they rarely produce code as quickly or concisely as a human can. So there's still a market for human beings who can write machine-code to order, and anyway it's great fun if you've got time to learn. Machine code programming also teaches you a lot about the 'inner workings' of the computer. Spectrum Plus Two Machine Language for the Absolute Beginner is the first 'Plus Two' book I've received for review. The publishers say the book will suit experienced Spectrum coders as well as beginners, because it details the special features of the new model. Contrary to the impression given by the title though, this is not a book for those with no programming experience. The introduction says that it is aimed at people who can already program in BASIC. I would not advise anyone to learn machine code as a first computer language. PRESENTATION The book is a 190-page paperback, set in fairly large type. The layout and presentation are a bit sloppy, but the binding seems solid and there are few very typos - author Joe Pritchard apparently can't spell 'dependent' (but nor could our 'Publishing Executive' until recently!). I could only find one, very minor, typing mistake in one of the program listings. The grammar is below average, even for a programming book, but it is not difficult to work out what the author means. There are a few feeble jokes, and exclamation marks litter the text. There are 16 chapters. which I split into three sections. The first part introduces the ideas which underlie machine code programming. Then come five chapters that list the 'instructions' which the Z80 processor can recognise. The last seven chapters are, to my mind, the best in the book - they deal with specific 'concepts' like sound, interrupts, the display, and so on. The one and a half page index is totally inadequate - it doesn't mention the LDIR instruction, or the RS-232 interface, for example. The first chapter is by far the worst, but luckily it's also the most dispensable. It's a mixture of patronising waffle and a baie minimum of 'hard facts'. Memory is referred to as 'boxes' and registers are called 'hands' and 'feet'. By the end of Chapter One, we know that the computer has a 'CPU' - a two inch piece of black plastic with 40 metal legs - plus a number of 'hands' and 'feet', where two 'hands' equals one 'foot'; a 'foot' has sixteen 'toes' and a 'hand' has 8 fingers! Besides the processor, the computer contains a mysterious 'spike' called a stack, which the CPU can push with two 'hands' - it's a good job most readers will already know what this chapter sets out to explain. Chapter One is the only part of the book which makes specific reference to the Plus Two - other sections refer to the Spectrum 128, and it seems certain that the book was originally written for users of the original (pre-Amstrad) 128. That doesn't matter much, as the differences between the two are almost entirely cosmetic, from the point of view of the machine code programmer at least. There is one annoying section however, that witters on about 'the EAR and MIC sockets of the tape interface', which don't appear on the Amstrad Spectrum. The second chapter is a vast improvement - a clear explanation of the 'binary' and 'hexadecimal' numbering systems used by machine code programmers. Binary numbers are printed with a zero at the start to distinguish them from decimal; hexadecimal numbers start with an ampersand when they crop up in the text, but a hash when they appear in programs. According to the text, some values are marked with a trailing 'H', but - thankfully - $ couldn't find any of those. Once numbers have been dealt with, the 'background' part of the book ends with a useful chapter about the interrelation between machine code and BASIC. The next section is quite well-written, but very unimaginatively planned. One chapter introduces all of the Z80's 'registers' and 'addressing modes', then 70 humdrum pages are used to introduce every instruction ZILOG the chip- makers own up to. There's no mention of the hundred or so 'undocumented' instructions which work, but are not part of the machine's official specification. Joe Pritchard follows the manufacturer's reference material faithfully, even though the resultant sequence of instructions makes it hard to write meaningful examples. The informaton is collected by category, as a processor-designer would see it, so you have to read half-way through the book, past all the complicated and esoteric instructions for shifting, binary coded decimal, logic and so forth before you find out about 'jumps' - the simple, essential machine code equivalents of IF and GO TO! If you struggle through the strange sequence you'll find that all the instructions are helpfully and accurately described, but the examples are uniformly trivial and do not build on the previous material, arbitrary as it is. To a great extent, the last sixty pages of the book are its saviour. They consist of seven essays, with examples, dealing with 'real world' subjects. The first essay, on interrupts, gets into a bit of a mess - one paragraph covers more than a page and says that interrupt mode 2 needs a 256 (not 257) byte vector table. The next paragraph runs to three quarters of page, and gets fairly confusing, The information is there - you just get a feeling that the author's grasp of it is not as firm as it might be. The data about the sound facilities seems complete, but again it is presented in the manufacturer's sequence, rather than as a tutorial. A lot of this information has appeared, in rather condensed form, in recent TECH TIPS columns, but the book is a good source of further information if you still don't know everything about 128 sound and RAM paging that you would like to. Joe Pritchard documents quite a few machine code routines built into the Spectrum ROM, but it refers you to another MELBOURNE HOUSE book, Ian Logan's Complete Spectrum ROM disassembly, for further information. Logan's ROM disassembly is just that - a line-by-line commentary on the code - and doesn't contain enough of an 'overview' to guide a beginner. Yet another MELBOURNE HOUSE book, Understanding Your Spectrum, does better in this regard, but unfortunately it duplicates a lot of the information in Pritchard's book. Joe gives you the bare minimum - for instance he explains how to plot individual paints on the screen, but not how to draw lines, even though there's a simple routine in the ROM to do that. He tells us how to read individual characters from the keyboard, but not how to read the joystick or check for combinations of keys - vital for games! There's absolutely no information about the second 16K ROM in the Plus 2 - the 'editor' ROM - and nothing about writing to the MIDI and Serial port. These subjects deserve attention: after all, the book sets out to be specific to the Plus Two. I've made a lot of criticisms of this book, but they should be taken in perspective. Spectrum Plus Two Machine Language for the Absolute Beginner contains lots of information, defines all the terms it uses, and is a better-than-average introduction to a complicated subject. It's a shame that it wasn't planned and edited more carefully.
Your Computer #2Feb 1987 · p.39
Author: Joe Pritchard Publisher: Melbourne House Price: £8.95 The Spectrum +2 with its 128K memory is for many Sinclair owners a long-awaited arrival. The enhanced sound, built-in data recorder and joystick port give the machine a new lease of life and offers greater potential. This hook is intended for those familiar with Spectrum Basic and aims to instruct the reader in the programming capability of machine code, thus allowing the potential of the machine to be utilised more fully. With chapters on registers, addressing modes, 8-bit and 16-bit operation, jumps, loops and interrupts, keyboard reading, screen-handling and graphics, every aspect of programming in machine code is covered in detail. When the course has been followed through there are some ROM routines which are extremely useful and also a quick reference guide for instruction and op-codes, as well as a flag operation summary. For anybody interested in the Spectrum, the book will prove a useful addition to any programmer's library.
News/Note1
- Your Sinclair #14Feb 1987 · p.6
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 description recorded.
Sign in to correct or add to this.
Hold the rights to this and want it taken down?