Beruflich Dokumente
Kultur Dokumente
EXPT. NO: 1
DATE:
1. AIM: Write an ALP in 8086 to implement Multi byte addition & subtraction.
2. COMPONENTS & TOOLS REQUIRED:
2.1 Personal Computer,
2.2 TASM Software
3. THEORY: Generally 8-bits are called a byte, 16-bits are called a word, 32-bits are called a
double word. The data more than 4 bytes is called a multi byte. Here, we are adding two multi
bytes which are stored at different locations. By using the instruction ADC, we can add byte by byte
with Carry. We can use SUB, SBB instructions for subtraction.
OUTPUT
OUTPUT
6. CONCLUSION:
EXPT. NO: 2
DATE:
1. AIM: Write an ALP in 8086 to implement Multiplication & Division (unsigned & signed).
2. COMPONENTS & TOOLS REQUIRED:
Lingayas Institute of Management and Technology, Madalavarigudem, Vijayawada-521212.
5.1 RESULTS:
INPUT
OUTPUT
MULTIPLICATION (SIGNED)
5.2 RESULTS:
INPUT
OUTPUT
5.1 RESULTS:
INPUT
OUTPUT
5.2 RESULTS:
INPUT
OUTPUT
6. CONCLUSION:
EXPT. NO: 3
DATE:
1. AIM: Write an ALP in 8086 to implement addition and subtraction of two ASCII numbers.
2. COMPONENTS & TOOLS REQUIRED:
2.1 Personal Computer,
2.2 TASM Software
3. THEORY: Generally, when you press a key on keyboard the keys will be encoded in the form of
ASCII codes. So we need to know the arithmetic operations of ASCII numbers.
For ex: The ASCII value of 0 is 30, ASCII value of 1 is 31 and so on. The ASCII value of a is 41,
ASCII value of b is 42 and so on. When we deal with ASCII arithmetic operations, we should
through with the ASCII related instructions like AAA and AAS. AAA is ASCII Adjust after addition.
AAS is ASCII Adjust after subtraction
5. RESULTS:
INPUT
OUTPUT
5. RESULTS:
INPUT
OUTPUT
6. CONCLUSION:
EXPT. NO: 4
DATE:
5. RESULTS:
INPUT
OUTPUT
5. RESULTS:
INPUT
OUTPUT
6. CONCLUSION:
EXPT. NO: 5
DATE:
1. AIM: Write an ALP in 8086 to convert from Packed BCD to Unpacked BCD.
2. COMPONENTS & TOOLS REQUIRED:
2.1 Personal Computer,
2.2 TASM Software
3. THEORY:
BCD means Binary Code Decimal. Binary Coded Decimal numbers are the numbers which
are decimal numbers from 0 to 9, but they are represented in binary form.
Generally we deal with decimal numbers rather than Hexa decimal numbers. So it is necessary to
know how to convert from Packed BCD to unpacked BCD. When we are converting we use
masking operations using AND instructions.
The packed BCD number can be converted to its ASCII equivalent using logical instructions.
The ASCII equivalents for the BCD numbers of 0, 1, 2, 9 are 30, 31, 32, 39 respectively. First
the packed BCD is converted to unpacked BCD and then converted to ASCII equivalent by using
the logical OR operation.
4(a). PROGRAM (for PACKED BCD TO UNPACKED BCD):
5. RESULTS:
INPUT
OUTPUT
5. RESULTS:
INPUT
OUTPUT
6. CONCLUSION:
EXPT. NO: 6
STRING OPERATIONS
DATE:
1. AIM: Write an ALP in 8086 using string operations for following:
(a) Move Block of Data
(e) Sorting
(c) Inserting
(d) Deleting
5. CONCLUSION:
6. VIVA QUESTIONS:
1. What is the instruction to jump instruction in implementing the sorting of signed numbers
in ascending order?
2. What is the instruction to jump instruction in implementing the sorting of unsigned
numbers in ascending order?
3. Give names of different sorting methods?
4. What is the difference between XCHG and CMP?
5. What is the difference between CMP and TEST?
DOS/BIOS PROGRAMMING
EXPT. NO: 7
DATE:
1. AIM: Write an ALP in 8086 for DOS/BIOS programming to read a character from key board with
or without echo and display characters/strings.
2. COMPONENTS & TOOLS REQUIRED:
2.1 Computer system,
2.2 MASM / TASM SOFTWARE
3. THEORY: (READ A CHARACTER FROM KEYBOARD)
01h is the function code to read the key from keyboard with echo. This function code will be stored
in the AH register. The characters (ASCII characters) which we typed will be stored in the AL
register and also displays on the screen. If AL=00H, the function call must be invoked again to
read an extended ASCII character. This function call automatically Echo and whatever is typed on
the video screen.
08H is the function code to read the key from keyboard without echo. The 08H code will be stored
in the AH register. The character (ASCII characters) which we typed will be stored in the AL
register.
The standard input device can be assigned as either the keyboard or the com port. This function
respond to a control break. A control break causes INT23H to execute.
09H is the function code to display a character string. This 09H will be stored in AH register. The
starting address of the string which we type through keyboard will be stored in DS:DX register.
The character string must end with an ASCII $. The character string can be of any length and
may contains control character such as carriage return 0DH) and line feed (0AH).
Lingayas Institute of Management and Technology, Madalavarigudem, Vijayawada-521212. 24
5. EXPECTED RESULTS:
5. EXPECTED RESULTS:
i) With Echo:
INPUT:
OUTPUT:
ii) With out Echo:
INPUT:
OUTPUT:
6. CONCLUSION:
EXPT. NO: 1
DATE:
1. AIM: Write an ALP in 8086 to interface 8255 PPI, generate sinusoidal wave using DAC
interfacing.
2. COMPONENTS & TOOLS REQUIRED:
2.1 Microprocessor 8086 Trainer Kit,
2.2 Power supply (5V, 3A)
2.3 DAC interface module
2.4 Power supply (12V)
2.5 Flat ribbon cable
2.6 Connector (3 or 4 pin)
3. THEORY:
The Dual DAC interface can be used to generate different interesting waveforms using
microprocessor. There are two eight-bit digital to analog converters provided, based on DAC 0800.
The digital inputs to these DACs are provided through the port A and port B of 8255 used as output
ports. The analog output from the DACs are given to operational amplifiers which act as current to
voltage converters. Two 10 K ohms pots are provided for the offset balancing of opamps.
The reference voltage needed for the DACs is obtained from a onboard voltage regulator uA723.
The voltage generated by this regulator is about 8V The outputs from the DACs vary between 0 to
5V corresponding to values between 00 to FF. Different waveforms can be observed at the opamp
outputs depending upon the digital input patterns.
For One Clock = 1 / 8 MHz = 0.125 s
To generate 1 ms delay i.e. 1000s = 1000 / 0.125 = 8000 Clock Cycles (CT)
L1:
MOV CX, N
4 Cycles
NOP
3 Cycles
NOP
3 Cycles
LOOP L1
17 or 5 Cycles
( C0 )
CL
CT = C0 + N (CL) 12
N = CT C0 + 12 / CL
= (8000 4 + 12) / 23
= 349 = 015D
CX = 015D
4. PROGRAM:
Amplitude =
Time period =
Frequency =
5. CONCLUSION:
6. PRECAUTIONS:
1. Give connections carefully such as Keyboard, Flat Ribbon cable if any and power supply
etc.
2. Switch on the power supply only after giving all the connections.
3. Handle the Trainer kits carefully.
7. VIVA-VOCE QUESTIONS:
1. Explain OUT and IN instructions?
2. What is the difference between Fixed Port and Variable Port?
3. What are the commands to execute this program?
4. What is Duty Cycle?
5. How can you generate Ramp Waveform?
6. How can you write 2ms delay program?
7. What is the difference between Macro and Procedure?
8. What is the difference between conditional Jump and Unconditional Jump instructions?
EXPT. NO: 2
DATE:
1. AIM: Write an ALP in 8086 to interface 8279 key board display and display a string of characters.
2. COMPONENTS & TOOLS REQUIRED:
2.1 Microprocessor 8086 Trainer Kit,
2.2 Power supply (5V, 3A)
2.3 8279 key board display interfacing module
2.4 Flat ribbon cable
3. THEORY:
ROLLING DISPLAY
Display/Keyboard mode set word and clear word take care of basic initialization of 8279. However,
before sending codes to the display RAM, a write display RAM control word should be sent. Then,
write the data to be displayed, to the data register.
Then, the data is fetched from address and is displayed in the first digit of the display. The next
data is displayed in the second digit of the display, since in the command word for write display
RAM the Auto increment flag is set. A time delay is given between successive digits for a lively
display.
N KEY ROLLOVER
With N-key rollover each key depression is treated independently from all others. When a key is
depressed, the debounce circuit waits 2 keyboard scans and then checks to see if the key is still
down. If it is, the key is entered into the FIFO. Any number of keys can be depressed and another
can be recognized and entered according to the order the keyboard scan found them
Any number of keys can b depressed and all will be entered There is no constraint that all keys
should be released before a depressed key is to be recognized.
b
g
c
. dp
d
SEGMENT
LETTER 'E'
HEX CODE
d
0
c
1
b
1
6
A
0
dp
1
g
0
f
0
e
0
4. PROGRAM:
ROLLING DISPLAY
5. EXPECTED RESULTS:
6. CONCLUSION:
7. PRECAUTIONS:
1. Give connections carefully such as Keyboard, Flat Ribbon cable if any and power supply
etc.
2. Switch on the power supply only after giving all the connections.
3. Handle the Trainer kits carefully.
8. VIVA-VOCE QUESTIONS:
1. What is Two-key lock out?
2. What is N-Key Roll over?
3. What are the MASM commands to execute this program?
4. What is the chip number for the BCD to 7 segment display?
5. What is look-up table? And Give an example?
6. What is the chip number of keyboard-display interface?
EXPT. NO: 3
DATE:
4. PROGRAM:
PROGRAM DESCRIPTION:
The main program initializes the 8259 to the above specifications. The program initializes the 8259
to type 8. So the interrupt vector for interrupt IR0 is 0000:0020. So at 0000:0020, enter the address
0000: 1200H, the ISR is at 0000:1200.
In the ISR, non-specific EOI command is given. In fully nested mode, the interrupt requests are
ordered in priority from 0 through 7 (0 highest). But in some applications there are a number of
interrupting devices of equal priority. In this mode, a device after being serviced receives the lowest
priority. This is known as Rotating Priority.
5. EXPECTED RESULTS:
6. CONCLUSION:
7. PRECAUTIONS:
1. Give connections carefully such as Keyboard, Flat Ribbon cable if any and power supply
etc.
2. Switch on the power supply only after giving all the connections.
3. Handle the Trainer kits carefully.
8. VIVA-VOCE QUESTIONS:
1. What is 8086 interrupt response?
2. What is the flag that has to be set when we want to use INTR pin?
3. What is the purpose of IE flag?
4. How many interrupts are there in 8086?
5. What is the difference between the software interrupt and hard ware interrupt?
6. What is the highest priority interrupt in 8086?
7. What is the use of ICW?
8. What is the use of OCW?
Lingayas Institute of Management and Technology, Madalavarigudem, Vijayawada-521212. 38
EXPT. NO: 1
DATE:
5. EXPECTED RESULTS:
6. CONCLUSION:
7. PRECAUTIONS:
1. Give connections carefully such as Keyboard, Flat Ribbon cable if any and power supply
etc.
2. Switch on the power supply only after giving all the connections.
3. Handle the Trainer kits carefully.
8. VIVA-VOCE QUESTIONS:
1. How many ports are there in 8051 microcontroller?
2. What is the alternate function of Port 0?
3. What is the alternate function of Port 1?
4. Name the port which does not having alternate function?
5. What is the alternate function of Port 4?
6. How many address lines are there in 8051?
7. What is the length of Data Bus in 8051?