What is Assembly Language? Assembly language is a low-level language that directly describes/controls the operation of the CPU. If you want to know what the CPU is doing and how the code runs, be sure to learn assembly language.
We know that the CPU is only responsible for calculations and does not have intelligence itself. You enter an instruction, it runs once, then stops and waits for the next instruction. These instructions are binary, called opcodes, such as the addition instruction is 00000011. The role of the compiler is to translate a program written in a high-level language into a single opcode and this is the content we readout from microcontroller PIC16F71.
For humans, the binary program is too hard to read which can be converted to Heximal later, and the code does not see what the machine does. In order to solve the problem of readability and occasional editing requirements, assembly language was born.
Assembly language is the textual form of binary instructions, which has a one-to-one correspondence with binary instructions. For example, the addition instruction 00000011 written in assembly language is ADD. As long as it is restored to MCU PIC16F716 binary code, the assembly language can be executed directly by the CPU, so it sits in the lowest level of low-level language.
At the earliest time of the history, writing a program is a handwritten binary instruction, and then inputting the computer through various switches. For example, to add, press the addition switch. Later, the paper tape puncher was invented, and the binary command was automatically input into the computer by punching holes in the paper tape.
To solve the readability of binary instructions, engineers write those instructions in octal. it is easy to convert Binary to octal, but octal readability is not good either. Naturally, in the end, it is still expressed in words, and the addition instruction is written as ADD. The memory address is no longer directly referenced, but is represented by a label.
In this case, there is one more step.
To translate these text instructions into binary, this step is called assembling. The program to complete this step is called assembler. The text it processes is naturally called aseembly code. After standardization, it is called assembly language, abbreviated as ASM which is converted from Binary.