BDS Software

Assembly Language Programming

Assembly Language is the programming language which is the closest to the computer's own machine language.

Machine Language is essentially just a long (long, long, long) series of ones and zeroes. Assembly Language is a one-to-one direct translation of machine code into something that is more easily recognized by human beings.

For example, suppose you saw the sequence 00110110 00000110. What would that mean to you? For convenience, you could translate this binary code into decimal 54 6 or to hexadecimal 36 06, but would that be any clearer?

In Radio Shack Color Computer 6809 Assembly Language, these two bytes would be translated as PSHU D, which means "Push the D Accumulator onto the System Stack". That's somewhat easier to remember than 00110110 00000110.

Assembly Language allows you to write code which runs faster than any other code (Scratch, Python, BASIC, Forth, even C/C++).

Of course, there's a catch.

Three, actually (at least):

1. Assembly Language is generally considered more difficult to learn than other languages.

2. Assembly Language code is quite lengthy. If you write a short program in Python that takes up a half-a-page of code, an Assembly Language program to do the same thing might take up two or three pages, or more.

3. Assembly Language is specific to one CPU. If you write a program in 6809 Assembly Language for the Color Computer, it won't run on your Windows machine (nor on your Mac, nor on your Raspberry Pi). You have to learn a different Assembly Language for each CPU.

Wikipedia has a good general introduction to Assembly Language.

You can also explore the 6809 code that appears in the Listings.zip files which are linked to from my CF83 Development page.


                                                                                                                                                                M.D.J. 2019/03/07