BASIC MACHINE CODE FOR THE ZX81
Posted: Mon Jul 18, 2022 11:28 pm
A beginner's series from SyncWare News, a 1984 newsletter
A delightful series, well written
CHAPTER 1 from Volume 2 Number 1 pages 8-10
Page 8
A delightful series, well written
CHAPTER 1 from Volume 2 Number 1 pages 8-10
Page 8
to be continued...BASILS' COMPENDIUM
BASIC MACHINE CODE FOR THE ZX-81/TS1000
John (Basil) Wentworth
1413 Elliston Drive
Bloomington, In. 47401
As the title implies, this series is designed to introduce the beginner to the basics of machine coding. The beginner in machine language that is. We must assume that you already have a working knowledge of BASIC.
As the title also implies, I will try as much as possible to relate machine code programming to the concepts of BASIC, with which you are already familiar. (I'm tempted to refer to this as Basil's Compendium on Machine Code, but I'll forego that conceit).
WHY MACHINE CODE?
Since you're already familiar with BASIC, you may wonder, why bother learning smother, more foreign language? The answer of course is SPEED, and more economical use of of memory, not to mention the fun of learning itself.
Think of computing as traveling in a foreign country. Machine language is the native language of the computer. If you have ever traveled abroad, then you are aware that is very convenient to have some knowledge of the local language. Although the residents of say, Barcelona (especially Barcelona!) are very courteous, and will make every effort to understand your language, you'll get your point across a lot faster if you speak Spanish. Again, a big part of the fun of traveling is a chance to try the language.
It is the same with computers. By knowing BASIC (an intermediate language), you're already halfway there. BASIC is akin to Pidgin, which was developed to help English-speakers to communicate with Chinese and Melanesian people (that's your history lesson for today).
Let us use a system similar to that used by many modern language schools - we'll learn to 'say' something useful, without worrying for the moment about vocabularies and the rules of the grammar. Like the beginning language student, or someone playing the violin by ear, we'll know how to make that single statement, but we won't be able to apply that knowledge to any other situation for some time yet. Don't panic though, we'll learn the rules as we go along. It's just that you might not lose interest so fast if we teach you to do something first.
Start by keying in the rudimentary loader program shown in figure 1-1. SAVE this program. We're going to use it several times, and it's a better than even bet that you will damage it before you get through with this lesson.