Documente Academic
Documente Profesional
Documente Cultură
Module 5
15EC42
Microprocessors
Basic Peripherals and their Interfacing with 8086 (Part 2): Interfacing ADC-0808/0809,
DAC-0800, Stepper Motor using 8255 (5.6.1, 5.7.2, 5.8). Timer 8254 – Mode 0, 1, 2 & 3 and
Interfacing programmes for these modes (refer 6.1 of Text).
INT 21H DOS Function calls - for handling Keyboard and Display (refer Appendix-B of
Text).
Other Architectures: Architecture of 8088 (refer 1.10 up to 1.10.1 of Text) and
Architecture of NDP 8087 (refer 8.3.1, 8.3.5 of Text). Von-Neumann & Harvard CPU
architecture and CISC & RISC CPU architecture (refer Reference Book 1).
Microprocessors 15EC42 Module-5 Notes
5.2 Programming using keyboard and video display
5.2.1 Character input with echo (Function 01H)
Reads a character from the standard input device and echoes it to the standard output
device. If no character is ready, waits until one is available.
Calling parameter: AH = 01H
Returns : AL = 8-bit input data
Program for reading a Character from keyboard
.MODEL SMALL
.DATA
MSG DB ?
.CODE
MOV AX,@DATA
MOV DS,AX
MOV AH,01H
INT 21H
MOV MSG,AL
MOV AH,4CH
INT 21H
END
5.2.2 Unfiltered character input without echo (Function 07H) or Character input
without echo (Function 08H)
Reads a character from the standard input device without echoing it to the standard output
device. If no character is ready, waits until one is available.
Calling parameter
AH = 07H or AH = 08H
Returns
AL = 8-bit input data
Write a program using DOS INT 21H function call to read a key from
keyboard. Display message GOOD if the key pressed is ‘G’ otherwise, do
not display any message.
.MODEL SMALL
Microprocessors 15EC42 Module-5 Notes
.DATA
MSG DB 10,13, ‘GOOD $’
.CODE
MOV AX, @DATA
MOV DS, AX
MOV AH, 07H ; to read character from key board
INT 21H
CMP AL, ‘G’
JNZ LAST
LEA DX, MSG
MOV AH, 09H ; to display string on console or monitor
INT 21H
LAST : MOV AH, 4CH
INT 21H
END
The addressing capability of 8088 is 1 Mega byte; therefore it needs 20 address lines. While
handling this 20-bit address, the segmented memory scheme is used and the complete
physical address forming procedure is similar to 8086. The memory organization and
addressing methods of 8088 and 8086 are similar. While physically interfacing memory to
8088, there is nothing like an even address bank or odd address bank. The complete
memory is homogeneously addressed as a bank of 1 Mega byte memory locations using the
segmented memory scheme. This change in hardware is completely transparent to software.
As a result of modified data bus, the 8088 can access only a byte at a time. This fact
reduces the speed of operation of 8088 as compared to 8086, but the 8088 can process the
16-bit data internally. On account of this change in bus structure, the 8088 has slightly
different timing diagrams than 8086.
The pin diagram of 8088 is as shown in Fig 5.2. Most of the 8088 pins and their functions
are exactly similar to the corresponding pins of 8086.
Microprocessors 15EC42 Module-5 Notes
Features:
• It can operate on the data of the integer, decimal, real types with lengths ranging
from 2 to 10 bytes.
• Performs add, sub and also complex operations like square root, exponential, tangent
etc.
• High performance.
• Multi-bus compatible.
• Follows IEEE floating point standard.
• It is also faster than 8086/8088 processor in performing mathematical computation.
• It has its own specialized instruction sets to handle mathematical programs.
Microprocessors 15EC42 Module-5 Notes
5.4.1 Architecture of 8087
The internal architecture of 8087 is as shown in Fig 5.3: