Introduction / The Reason for Assembly Language
Subtitles of the Movie
In the very beginning when the first digital computers were constructed, it was necessary to program them by toggling ones and zeros into memory to construct the instructions. For example, say you want to perform the simple operation of adding the 8 bit AEC register with a bit value of 37. To do that on an 8086 chip you would enter these bits, now this is a very simple instruction, the first 7 bits specifies the operation adding a value into the A register. The 8th bit specifies that this is an 8 bit operation so that register is the 8 bit AEC register not the 16 bit AX register. The second byte is the value shown here is the binary representation of the value 37. Now there is no difference between instructions and data. This is the same instruction, it can be written as two hexadecimal digits this way or they can be written as two base ten numbers this way. Bits are bits, executable code and data are the same and it doesn't matter how you write them as long as what you write can be interpreted and stored in the computer as zeros and ones. Now doing it like this is cumbersome however, in the early days of computing it soon became apparent that this was a very slow and tedious way to program a computer so they wrote a program that would read words, translate them into bits and then assemble the bits into instructions. The example instruction that I just showed you can be written this way and the assembler does the work of figuring out just what the bits are, then assembles all the bits into the proper form. Writing code this way has advantages, for one errors are easier to catch, if you make an error with the words the assembler is likely to catch it, in this example the words AND and AC are called mnemonics. They are words that represent bit patterns. The theory was that mnemonics were easier to remember and to use than were the bit patterns. Before assemblers existed it was necessary to program computers by punching in the sequence of one zeros. The front panels of the computers consisted of rows of lights, some representing the bits and others representing the address at which the bits were stored. When the computer ran the lights would flicker as the program ran through the values. You can still see that today in old movies where they show computers with front panels of flashing lights. The theory that assemblers help programming seems to be right. Through Assembly Language and its mnemonics we got operating systems, scientific applications, text editors, and even higher level languages. Early experiments with higher level languages included things like COBOL and FORTRAN but later, the whole thing about languages got back to the ability to work at the bit level, in particular, the C language was developed by and for Assembly Language programmers. We all use compilers now but we can only do that because somebody started the whole thing off by punching in the bits. Today, the most popular languages have been derived from C. If you understand Assembly Language you will be better at C, C++, and Java because you will understand what's going on inside. The same as you can be a better driver if you understand how the internal combustion engine works. So to my thinking, the first reason you should learn Assembly Language is to learn more about how the computers work. The more you know about what's going on the better you will be able to write programs and know what is happening. Under the right circumstances, Assembly Language code can be smaller and faster than the code generated by a compiler. With modern optimizers and compilers, this is not as true as it was a few years ago but it will always be a factor where timing is important. You can directly address the hardware from Assembly Language, this is often cumbersome and sometimes impossible through the restrictions imposed by a higher level language. Through a knowledge of Assembly Language you will gain a better understanding of the job that the compiler is doing for you.
Tutorial Information
| Course: | Assembly Language Programming |
| Author: | Arthur Griffith |
| SKU: | 33995 |
| ISBN: | 1-935320-44-0 |
| Release Date: | 2009-05-28 |
| Duration: | 5.5 hrs / 70 lessons |
| Work Files: |
Yes |
| Captions: | Available on CD and Online University |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |
VTC Sign up & Benefits
- Unlimited Access
- 81,350 Video Tutorials (20,800 free)
- Video Available as Flash or QuickTime
- Over 782 Courses
- $30 for One Month Access
- Multi-User Discounts Available
United States 