Assembly Language Programming:
What is a Program?
A computer can only do what a programmer has instructed it to do, in the form of a program. A program is merely a sequence of very simple commands that lead the computer to solve out some problem. Once the program is written properly, the computer can execute the instructions very quickly, and always do it the same, every time, without a mistake. There lies the power of a computer. Even though the program contains very simple instructions, the overall result may be very impressive, mostly because of the speed at which the computer can process the instructions. Even though each of the steps in the program is extremely simple, the sequence of instructions, executing at millions of steps per second, can appear to be very complex, when taken as a whole. The trick is not to think of it as a whole, however as a series of extremely simple steps, or commands.
The microprocessor itself is generally a single integrated circuit (IC). Most of the microprocessors, or very small computers, contain much the same commands or instructions that they can carry out. They mostly vary in the names utilized to describe each command. In a typical microprocessor, there are commands to move data around, perform simple math (subtract, add, multiply, and divide), bring data into the microprocessor from the outside world, and send data out of the microprocessor to the outside world. A typical microprocessor has three fundamental parts inside. They are the Memory, Program Counter (PC), and Input/output (I/O). The Program Counter keeps track of which command is to be executed. The Memory has the commands to be executed. The Input/output handles the transfer of data to and from the outside world.