Authors
Publication
Pub Details
Date
Pages
Introduction to 2068 Machine Code by Dr. Lloyd Dreger & Advanced 2068 Machine Code by Dr. Lloyd Dreger / S.M.U.G.
[A note to readers: The differences between “assembly language” and “machine language” are subtle and unimportant in this review. For the purposes of this article, the two terms may be considered equivalent.]There are many good books that teach BASIC programming for beginning and advanced T/S 2068 programmers. However, the 2068 programmer interested in assembly language programming is faced with a shortage of information. Although there is no shortage of books on Z80 assembly language, none of them cover the T/S 2068 and its operating system. An exception is the T/S 2068 Technical Manual, but that book was never intended to be a tutorial.
Dr. Lloyd Dreger, of the Sinclair Milwaukee Users Group, saw this problem and decided to do something about it. The result is two books. The first, a 213 page manual called Introduction to 2068 Machine Code, covers nearly every aspect of machine language on the 2068, Including a tutorial on the basic concepts behind machine language programming. It was written with the assumption that the reader knows BASIC, but not necessarily machine code. However, those who already know something of Z80 machine code will benefit just as much as the beginning student. The manual goes to the heart of the 2068, explaining the BASIC interpreter, the 2068 memory map, video modes & screen addressing, the system variables, and sound.
Armed with thorough understanding of the inner workings of the 2068 and the basic concepts behind machine code thinking, the reader dives right into machine Lanuage programming with a look at the CPU and how it works. The Z80 assembly instruction set is examined in detail, with examples demonstrating their use. Later, the author touches on advanced concepts like bank switching, the floating point processor, the function dispatcher. and how peripherals (such as printers, disk drives, and modems) work. Six appendices provide helpful tables and information for the reader.
One complaint I have is with a PRINT routine in appendix B that bad bugs in it. The author uses the program to teach basic techniques to his machine code classes at SMUG, so a detalled explanation of the program and what’s going on is not included. I suspect that the bugs are deliberate and meant for his students to correct. However, there is no mention of this in the manual. It can be irritating for the beginning reader to be faced with a buggy program with no hints as to how to correct it, especially when he doesn’t expect any bugs in the first place.
Book two, Advanced 2068 Machine Code Volume 1, covers graphics and advanced screen programming. If you want to write that ultimate “Paint” program, or you are interested in the 2068’g advanced video modes, this book is what you are looking for. It begins with a few notes about assemblers and compilers for the 2068. The second chapter starts you out with a few simple routines that should be in every programmer’s toolbox (screen clear, locate screen address, etc). Chapter three includes an article (originally from the SMUG Bytes newsletter) about bank switching BASIC programs with the Aerco disk drive’s expanded memory banks. The author expands upon it with a discussion about using advanced screen modes while bank switching.
The next three chapters are devoted to the TS 2068’s advanced video modes: 64 and 80 (yes 80) column screens, dual screen mode, and high resolution graphics mode. The author provides many examples and a generous amount of source code, including complete, debugged versions of the advanced video mode routines from the T/S 2068 Technical Manual.
The remainder of the book is about game programs and the ideas behind then. ‘Sprites’ are examined and a super sprite driver is developed that puts the Tech Manual routines to shame. It culminates in a shoot-em-up arcade game that involves some complicated timing, interrupts, and even drawing on the border. Finally, the book examines fractals and how to develop the scene portion of graphical adventure games.
For those who aspire to become crack Z80 assembly language wizards on the 2068, these two books are a must. If you are a beginning machine language programmer, you will not find a more informative and well-thought out tutorial anywhere.
Dr. Dreger is currently working on Advanced 2068 Machine Code Volume 2, which will cover BEEP, sound, and music on the 2068, and a closer look at the T/S 2068 ROM routines, to be released in 1989. A companion to these books, The Timex/Sinclair 2068 ROM Manuscript, also by Dr. Dreger, is a disassembly of the 2068 ROM with comments and cross-references to the Sinclair Spectrum ROM. It is a valuable reference for assembly language programmers of all leagues.
The books are distributed by S.M.U.G., the Sinclair Milwaukee Users Group, at Box 101, Butler, WI 53007. They are also carried by most Timex/Sinclair dealers. Order yours today.