Lecture 4 - 5 - 6 - CSE - Microprocessor and Assembly Language
Lecture 4 - 5 - 6 - CSE - Microprocessor and Assembly Language
Assembly Language
Marjia Sultana
Lecturer
Department of Computer Science and Engineering
Begum Rokeya University, Rangpur
Lecture 4: Pin Diagram of 8086
Pin Diagram of 8086
Intel 8086-Pin Details
Min/Max mode
Minimum Mode: +5V
Maximum Mode: 0V
Maximum Mode
Pins
4
Pin Functions
• Out of 40 pins, 32 pins are having same function in minimum or
maximum mode,
• And remaining 8 pins are having different functions in minimum and
maximum mode.
• Following are the pins which are having same functions
Common Pin Description
BHE’ / S7 – Pin number 34 – BHE is an acronym for Bus High Enable. The
combination of the BHE signal and S7 status informs about the existence of
the data on the bus. Also, different combinations show whether the bus is
containing overall 16 bit, upper byte or lower byte of the data.
The table below represents the status for the signal at this pin:
Common Pin Description
S0‘, S1‘ and S2‘ – Pin number 26 to 28 – These are basically 3 status pins
and are active low. This means that if the status at all the 3 pins is 0
then it shows that multiple interrupts are to be handled in maximum
mode.
The table below is representing the status of the processor in different
combinations:
S2 S1 S0 Characteristics
Interrupt
0 0 0
acknowledge
0 0 1 Read I/O port
0 1 0 Write I/O port
0 1 1 Halt
1 0 0 Code access
1 0 1 Read memory
1 1 0 Write memory
1 1 1 Passive state
Pins in Maximum Mode
• The effective address (EA) of source data is stored in SI register and the EA of destination is stored in DI register.
• Operations:
• (MAE) (MA)
DEC AL
DEC D D=D–1 DEC [CX] memory
DEC [1000] direct memory
CBW none converts signed byte to CBW
word
Arithmetic Instruction
OPCODE OPERAND EXPLANATION EXAMPLE
CMP AX, CX
CMP Mem/Reg1, Mem/Reg1-Mem/Reg1
Mem/Reg1 Subtract two values AX-CXflag [modify]
Never store subtract
result
Arithmetic Instruction
OPCODE OPERAND EXPLANATION EXAMPLE
ASCII adjust
AAA none accumulator after AAA
addition
ASCII adjust
AAS none accumulator after AAS
subtraction
ASCII adjust
AAM none accumulator after AAM
multiplication
ASCII adjust
AAD none accumulator after AAD
division
Logical Instruction
OPCODE OPERAND DESTINATION EXAMPLE
OR D, S D = D OR S OR AX, BX