Chapter One: Introduction


1.1 Introduction


Welcome to programming! Welcome to HLA! Computer programming is a fun and interesting hobby, and also pays well if you do it for a living. I have tried to make this book as good as I can for the intended audience. Hopefully you can find this book informative and still interesting. I only hope you can have as much fun reading it as I had writing it (hopefully more).


1.2 This Book’s Audience


The audience this book is written for is computer hobbyists who know a good deal about command line interfaces and don’t mind having to go through too much theory to learn how to program. This book is NOT intended for academic use. It is not intended for use in a university.



1.3 My Goal


I wrote this book with the goal of producing a quality book that someone with no programming experience at all could pick up and learn how to program. My intended target is those who don’t have the first clue how to program. I hope I have succeeded.


1.4 Programming Language Overview


Programming Languages come in many forms, from the tersest of languages, machine code, to very English-like. No matter what the language, it is broken down into three base categories:


     1. Machine Code

This is the lowest language there is. Machine code is nothing but either binary digits or hexadecimal number strings. It looks something like this in practice:

               11110000100011012

or

               F08D16

Look hard? It is to most. That’s why people invented Assembly Languages and High Level Languages.


     2. Assembly Language

Assembly languages, in their first incarnations, were languages that directly translated down into machine code. If you saw a statement in an assembly language program, you knew it would become only one statement. This enabled a simplification of the above:

               add blah

instead of

               F08D16

It looks easier, doesn’t it? It does to me.


     3. High Level Languages

High Level Languages (commonly called HLLs) were created because working with assembly was still too tedious for most. You needed many instructions to accomplish the same tasks as in one line of HLL code. The first language many people try is an HLL. HLLs look more like English than any other language in existence, currently. HLLs are also independent of the processor on which they run, unlike machine and assembly code.


Notice That HLLs seem to be easier than other languages to program in? For many, that is so. HLLs have an advantage over traditional assembly languages: clarity. Something expressed in an HLL is far easier to understand than the same thing expressed in traditional assembly language.


Also notice that I keep saying “traditional” assembly language. That is because there has been a trend change in assembly lately. The change is a shift from traditional assembly to what is called “High Level Assembly.” High Level Assembly has a firm advantage over traditional assembly: clarity. High Level Assemblers took some of the constructs found in HLLs and transferred them to assembly. I, personally, find high level assembly code far easier to read than traditional assembly code.


1.5 Why Assembly?


Considering the fact that assembly isn’t very popular, this is a valid question. Assembly is still the most powerful programming language in existence, regardless of what’s thought of it.


One reason assembly had lessened in popularity was because there were a variety of processors that were incompatible. Each processor had its own machine language, and consequently, its own assembly language.


That argument has all but faded away. How many home PCs don’t use a Pentium Processor or derivative (Pentium II, Pentium III, Pentium IV, Celeron, etc.). The Intel Processors introduced the idea of backwards compatibility which threw the computer marketplace for a loop, I believe. Today, all Pentium I Processors or later can run any code created specifically for the Pentium I. Each new processor has only been faster and introduced new instructions, but they keep all the old ones around so you don’t have to worry about anything.


1.6 Why HLA?


A good place to start is: what is HLA? HLA is a programming language created by Randall Hyde for the purpose of easing the task of teaching assembly language to students. In the academic environment, HLA has gone over quite well, where it has been used.


Of course, you’re likely beginning to panic a bit now. While HLA was designed to ease teaching assembly language to people who have HLL experience, you don’t need to have HLL experience to learn assembly using HLA. All it takes is a some alterations to the teaching methods.


I also had another reason for using HLA. HLA is the most powerful assembly language to date. No current assembler possess the level of power HLA has. If your going to learn assembly, then you might as well learn using the most powerful x86 assembler available.


HLA, however, may turn out to not be for you in the end, so I encourage you to seek out other languages and try them for yourself. Each language has its strengths and weaknesses.


1.7 Layout of This Book


Hopefully, I can give you an idea of what’s to come in the following chapters. I created this book for those who don’t know how to program, but also don’t mind having to take in a little theory along the way.


This book is divided into two volumes. The first volume teaches programming in pure assembly code. It also teaches structured programming and algorithms and their use to first-time programmers. Volume two teaches the high level features of the HLA language. It focuses on the advanced material present in the HLA language. I recommend that you firmly understand the contents of volume one before proceeding on to volume two.


Volume one has around 23 chapters planned. Sound like a lot? Only about 17 teach material needed for programming and the other five give you extra stuff to look over.


I won’t bother giving you any information about chapter one, as that’s what your reading right now.


[...]


1.8 Conclusion


Feel like a long chapter? I hope you enjoyed it. If you think this is bad, you haven’t seen anything yet. This is only the beginning, so prepare for a long journey. I only hope you enjoy it.