<< Chapter < Page | Chapter >> Page > |
A program is a set of instructions that are grouped together to accomplish a task or tasks. The instructions, called machine code or assembly code consist of things like reading and writing memory, arithmetic operations, and comparisons. While these instructions sound simple, it is actually possible to solve a huge group problems with them. The difficulty in doing so is that you must specify in exact detail precisely how. Good programming is both an art and a science, and what you will learn today is a beginning of the craft.
As mentioned above, the individual instructions that the machine actually quite simple or low-level in computer parlance. Writing complex programs in assembly code took such a long time that eventually better programming languages were invented. A programming language, like C, is a formal set of grammar and syntax like assembly code; but the instructions in high-level languages encompass hundreds of assembly instructions. Programs called compilers translate a program written in a higher level language into assembly so that the computer can actually execute the instructions. Compilers let the programmer write programs so that humans can read them easily while the computer can still execute the instructions.
Generally programming code is organized into text files with suffixes that indicate the programming language. In the case of C these files are appended with .c, and a C program is made up of at least one of these files.
Notification Switch
Would you like to follow the 'Microcontroller and embedded systems laboratory' conversation and receive update notifications?