The next instruction added the values in register AX and register BX, and then stored the final value in register AX.įigure 5 shows the high and low bytes (AH and AL) of the AX register. The arithmetic instructions for 8086 include addition, subtraction, multiplication, division, comparison, negation, increment and decrement.įor the remaining part of this article, all instructions will be executed using the EMU8086 version 4.08 software.įrom Figure 4, the instructions on lines 01 and 02 initialized registers AX and BX with value of 01h. The first operand AL is the destination and the second operand 4Dh is the source. In assembly language, the operand is the value upon which the opcode operates on. During assembly, the label is assigned the current value of the active location counter and serves as an instruction operand.Ĭomments begin with a semicolon ( ) and do not generate machine codes.
The label is just an address identifier LabelsĪ label can be placed at the beginning of a statement. So that it can store information (under different values and different sizes), each processor is composed of different parts, “boxes,” called registers. CISC is a CPU design where one instruction works several low-level acts such as memory storage, loading from memory and an arithmetic operation.
This means the microprocessor has the capacity to perform multi-step operations or addressing modes within one instruction set. Prior to writing a program in assembly language, it is necessary to have sufficient knowledge of the hardware for the controller or processor.Īs discussed on Elprocus, the architecture for the 8086 microprocessor is based on complex instruction set computing (CISC). This low-level language is developed using mnemonics. An assembly language is a low-level programming language designed for a specific type of hardware processor.