Professional Documents
Culture Documents
8086imp Short Programs8
8086imp Short Programs8
Increment R16
Increment R8
Increment M8
NOTE:- In this instruction there is a single operand, [BX]. It is not clear whether it is
byte or word operand. Byteptr assembler directive announces to the assembler that it is a
byte operation.
Increment M16
NOTE:- In this instruction there is a single operand, [BX]. It is not clear whether it is
byte or word operand. wordptr assembler directive announces to the assembler that it is a
word operation.
Decrement R16
Decrement R8
DEC DH 8 opcodes Before After
Ex. 1 DH 12H 11H
Ex. 2 DH 00H FFH
Decrement M8
DEC byteptr [BX] Before After
24 opcodes BX 2000H
DS:2000H 00H FFH
DS:2001H 12H 12H
NOTE:-In this instruction there is a single operand, [BX]. It is not clear whether it is byte
or word operand. Byteptr assembler directive announces to the assembler that it is a byte
operation.
Decrement M16
DEC wordptr [BX] Before After
24 opcodes BX 2000H
DS:2000H 00H FFH
DS:2001H 12H 11H
NOTE:- In this instruction there is a single operand, [BX]. It is not clear whether it is
byte or word operand. wordptr assembler directive announces to the assembler that it is a
word operation.
Perform 1’s complement of R16
NOTE:- In this instruction there is a single operand, [BX]. It is not clear whether it is
byte or word operand. wordptr assembler directive announces to the assembler that it is a
word operation.
NOTE:- In this instruction there is a single operand, [BX]. It is not clear whether it is
byte or word operand. Byteptr assembler directive announces to the assembler that it is a
byte operation.
PUSH R16
Suppose SP content is 5678H. It means locations 5678, 567A, 567C … in stack segment
are full. Locations 5676, 5674, … are empty. Information pushed to location 5676 and SP
value changes to 5676H. Push operation is always on 16 bit data.
PUSH M16
PUSH SR
PUSH Flags
NOTE:- Suppose SP content is 5678H. It means locations 5678, 567A, 567C … in stack
segment are full. Locations 5676, 5674, … are empty. Information poped from location
5678 and SP value changes to 567AH. Pop operation is always on 16 bit data.
POP M16
POP SR
POP Flags
CX 00FEH 00FEH
AX 0002H 01FCH 01FCH = 508
DX 1234H 0000H