Forget everything you learnt about Basic. This is something completely different.
Since starting this guide, my personal experience proved that people new to assembly live among misconceptions. For example, they are used to the fact that clearing the screen means no more than using a simple ClrScr or similar command. This apparently implies that clearing the screen is an elementary operation for the computer. Many guides I read are also written in this spirit. People are used to the fact that teaching any programming language should start with a “Hello World” program. Unfortunately, such a program would be impossible to understand for a newbie if written completely in assembly (the source of this program would be several kilobytes long, depending on the actual hardware). The guides I am talking about solve this problem by using an external program to display a text, therefore the first program only teaches you how to use that particular display routine. This would be no problem of course, but unfortunately such guides often stick to this practice to explain everything else, so the result is that the reader will learn to use a particular library of routines, and nothing more.
One such guide is that of James Matthews, and I have to point this out because many people claim it being the best assembly guide around. The reason why I put it in the reference list is my appreciation of the extensive work done by the author. In spite of my respect, I have to disagree with his methodology. He admits that at the time of writing the guide, he was also still learning the things he was writing about. This certainly helped to make the guide comprehensible to the beginner, I have no doubts about that. The problem is that I frequently see self-appointed assembly programmers who do not have the faintest idea about the basics of assembly language – about how things really work (they claim to know assembly, but their questions can be really stunning sometimes). The reason for this is that they are not used to write their own code; the situation is the same as that of the children who learn (are taught) to perform elementary operations with calculators. They never learn the real meaning of the operations.
My aim is to clear up the confusion. This guide will proceed very slowly, there will be no spectacular programs in the first sections, only basic concepts. It is important to really learn the basics of assembly, which is a huge material to memorise. But it is worth to start, you can believe me.
You should always keep in mind: the computer can do no more than process one byte of data at a time. This byte can be read from the memory or written to it, or transferred to/from another hardware device outside the processor (through so-called I/O ports). The CPU can also perform addition and subtraction of two bytes or some logical operation between two bytes (AND, OR, XOR). Assembly is a low level language, which means that you have to do everything using only these few simple operations listed above. The Z80 does not even know how to multiply two numbers! This is already up to you to code. I will try to teach you how to manage on your own. Please, be patient. :)
Back to the index