Lap Manual
Lap Manual
NO :
DATE :
AIM:
To write an Assembly Language Program (ALP) for performing the Addition operation of two byte
numbers.
ALGORITHM:
Initialize the MSBs of sum to 0000
Get the first number
Add the second number to the first number.
If there is any carry, increment MSBs of sum by 1.
Store LSBs of sum.
Store MSBs of sum.
FLOWCHART
OUTPUT:
INPUT OUTPUT
ADDRESS DATA ADDRESS DATA
2000 22 22 2004 33 33
2002 11 11 2006 00 00
RESULT:
Thus To write an Assembly Language Program (ALP) for performing the Addition operation of two
byte numbers is performed and result is stored.
1. What is Microprocessor? Give the power supply & clock frequency of 8085
A microprocessor is a multipurpose, programmable logic device that reads binary instructions from a
storage device called memory accepts binary data as input and processes data according to those instructions
and provides result as output. The power supply of 8085 is +5V and clock frequency in 3MHz.
4. Explain ALIGN.
The ALIGN directive forces the assembler to align the next segment at an address divisible by specified
divisor. Example: ALIGN 8.
5.Explain ASSUME.
The ASSUME directive assigns a logical segment to a physical segment at any given time. It tells the
assembler what address will be in the segment registers at execution time. Example: ASSUME CS: code, DS:
data, SS: stack
6. What is assembler?
The assembler translates the assembly language program text which is given as input to the assembler to
their binary equivalents known as object code
AIM:
EXP.NO :
DATE :
To write an Assembly Language Program (ALP) for performing the subtraction operation of two byte
numbers.
ALGORITHM
Initialize the MSBs of difference to 0
Get the first numbers
Subtract the second number from the first number.
If there is any borrow, increment MSBs of difference by 1.
Store LSBs of difference
Store MSBs of difference.
FLOWCHART
1019 HLT
OUTPUT:
INPUT OUTPUT
ADDRESS DATA ADDRESS DATA
2000 22 22 2004 11 11
2002 11 11 2006 00 00
RESULT:
Thus To write an Assembly Language Program (ALP) for performing the subtraction operation of two
byte numbers is performed and result is stored.
5.Define BIOS
The IBM PC has in its ROM a collection of routines, each of which performs some specific function
such as reading a character from keyboard, writing character to CRT. This collection of routines is referred to
as Basic Input Output System or BIOS.
7. Define pipelining?
In 8086, to speed up the execution of program, the instructions fetching and execution of instructions
are overlapped each other. This technique is known as pipelining.
AIM:
EXP.NO :
DATE :
To write an Assembly Language Program (ALP) for performing the multiplication operation of two byte
numbers.
ALGORITHM
Get the multiplier
Get the multiplicand
Initialize the product to 0
Product = product + multiplicand
Decrement the multiplier by 1
If multiplicand is not equal to 0,repeat from step (d) otherwise store the product.
FLOWCHART
OUTPUT:
INPUT OUTPUT
ADDRESS DATA ADDRESS DATA
2000 11 11 2100 42 86
2002 22 22 2102 46 02
RESULT:
Thus To write an Assembly Language Program (ALP) for performing the multiplication operation of
two byte numbers is performed and result is stored.
EXP.NO :
DATE :
3.What is Coprocessor?
The coprocessor is a processor which specially designed for processor to work under the control of the
processor and support special processing capabilities. Example : 8087 which has numeric processing capability
and works under 8086.
5.Write the advantages of loosely coupled system over tightly coupled systems?
1.More number of CPUs can be added to improve the system performance.
2.The system structure is modular and hence easy to maintain and troubleshoot.
3.A fault in a single module does not lead to a complete system breakdown.
6.What are the schemes for establishing priority in order to resolve bus arbitration problem?
There are three basic bus access control and arbitration schemes,
1.Daisy Chaining
2.Independent Request
3.Polling
AIM:
EXP.NO :
DATE :
To write an Assembly Language Program (ALP) for performing the division operation of two byte
numbers.
ALGORITHM
Get the dividend
Get the divisor
Initialize the quotient to 0.
Dividend = dividend – divisor
If the divisor is greater, store the quotient. Go to step g.
If dividend is greater, quotient = quotient + 1. Repeat from step (d)Store the dividend value as
remainder.
FLOWCHART
EXP.NO :
DATE :
OUTPUT:
INPUT OUTPUT
ADDRESS DATA ADDRESS DATA
2000 88 88 2100(Q) 00 04
2002 22 22 2102(R) 00 00
RESULT:
Thus To write an Assembly Language Program (ALP) for performing the division operation of two byte
numbers is performed and result is stored.
4. Define a program?
A program is a sequence of instructions written to tell the computer to perform a specific function.
7. What is an IN instruction?
This is a 2-byte instruction. It accepts data from the input port specified in the second byte.
AIM:
EXP.NO :
DATE :
ALGORITHM:
Initialize the MSBs of sum to 0
Get the first number
And operation the second number to the first number.
Store LSBs of sum.
Store MSBs of sum.
FLOWCHART
100B HLT
OUTPUT:
INPUT OUTPUT
ADDRESS DATA ADDRESS DATA
1100 01
RESULT:
Thus To write an Assembly Language Program (ALP) for performing the AND operation of two byte
numbers is performed and result is stored.
6.Specify the bit of a control word for the 8255, which differentiates between the I/O mode and the BSR mode?
BSR mode D7=0,
I/O mode D5=1
7.Write the input /output feature in Mode 9 for the 8255A PPI?
Outputs are latched
Inputs are not latched
9. Define T-state?
T-state is defined as one subdivision of the operation of performed in one clock period.
AIM:
To perform logical OR operation between two numbers.
ALGORITHM:
EXP.NO :
DATE :
FLOWCHART
1004 OR AL,BL
100B HLT
OUTPUT:
INPUT OUTPUT
ADDRESS DATA ADDRESS DATA
1100 F7
RESULT:
Thus To write an Assembly Language Program (ALP) for performing the OR operation of two byte
numbers is performed and result is stored.
VIVA-VOCE QUESTION & ANSWERS
5.Write a program to mask the 0th and 7th bit using 8051?
MOV A,#data
ANL A,#81
MOV DPTR,#4500
MOVX @DPTR,A LOOP: SJMP LOOP
AIM:
To perform logical XOR operation between two numbers.
ALGORITHM:
Initialize the MSBs of sum to 0
EXP.NO :
DATE :
FLOWCHART
OUTPUT:
INPUT OUTPUT
ADDRESS DATA ADDRESS DATA
1100 F6
RESULT:
Thus To write an Assembly Language Program (ALP) for performing the XOR operation of two byte
numbers is performed and result is stored.
VIVA-VOCE QUESTION AND ANSWERS
3.Define bit.
A digit of the binary number or code is called bit. Also, the bit is the
fundamental storage unit of computer memory.
4.Define byte.
The 8-bit (8-digit) binary number or code is called byte .
5.Define word.
16-bit binary number or code is called word. (Some microprocessor manufactures refer the basic data
size operated by the processor as word).
AIM:
To perform logical NOT operation between two numbers.
ALGORITHM:
EXP.NO :
DATE :
FLOWCHART
1002 NOT AL
1009 HLT
OUTPUT:
INPUT OUTPUT
ADDRESS DATA ADDRESS DATA
1100 AA
RESULT:
Thus To write an Assembly Language Program (ALP) for performing the NOT operation of two byte
numbers is performed and result is stored.
VIVA-VOCE QUESTION AND ANSWERS
3.What is an Instruction?
An instruction is a binary pattern entered through an input device to command the microprocessor to
perform that specific function.
5.What is Assembler?
The assembler translates the assembly language program text which is given as input to the assembler to
their binary equivalents known as object code.
The time required to translate the assembly code to object code is called access time. The assembler checks for
syntax errors & displays them before giving the object code.
6. Define Variable?
A Variable is an identifier that is associated with the first byte of data item.
7. Explain Dup?
The DUP directive can be used to initialize several location & to assign values to these locations.
8. Define Pipelining?
In 8086,to speedup the execution program ,the instructions fetching and execution of instructions are
overlapped each other this is known as Pipelining.
AIM:
To convert a given Move a data block without overlap
.
ALGORITHM:
EXP.NO :
DATE :
FLOWCHART
PROGRAM FOR TO MOVE BLOCK OF DATA FROM ONE LOCATION INTO ANOTHER
LOCATION WITHOUT OVERLAP USING 8086
OUTPUT:
INPUT OUTPUT
ADDRESS DATA ADDRESS DATA
2000 10 2400 10
2001 20 2401 20
2002 30 2402 30
2003 40 2403 40
RESULT
Thus To write an Assembly Language Program (ALP) for performing the convert a given Move a data
block without overlap is performed and result is stored.
Latch is a D- type flip-flop used as a temporary storage device controlled by a timing signal, which can
store 0 or 1. The primary function of a Latch is data storage. It is used in output devices such as LED, to hold
the data for display.
5.What is interrupt?
Interrupt is a signal send by external device to the processor so as to request the processor to perform a
particular work.
8.What is an Opcode?
The part of the instruction that specifies the operation to be performed is called the Operation code or
Op code.
9.What is an Operand?
The data on which the operation is to be performed is called as an Operand.
AIM:
To convert a given decimal number to hexadecimal.
ALGORITHM:
EXP.NO :
DATE :
FLOWCHART :
PROGRAM FOR TO CONVERT THE HEX (FFFF) NUMBER INTO ITS EQUIVALENT DECIMAL
VALUE USING 8086
ADDRESS LABEL MNEMONICS OPCODE COMMENT
1027 DIV BL
1029 INC SI
1035 DIV BL
1037 INC SI
103A INC SI
EXP.NO :
DATE :
103D HLT
103E
OUTPUT:
INPUT OUTPUT
ADDRESS DATA ADDRESS DATA
1200 06
1201 05
1202 05
1203 03
1204 05
RESULT
Thus To convert a given decimal number to hexadecimal is performed and result is stored.
AIM:
To write a program for addition operations between two decimal numbers.
ALGORITH:
1. Initialize the pointer only for data and result
EXP.NO :
DATE :
FLOWCHART
1005 INC SI
100A DAA
100B INC SI
100E HLT
OUTPUT:
INPUT OUTPUT
ADDRESS DATA ADDRESS DATA
1100 05
1102 11
1101 06
RESULT:
Thus to to write a program for addition operations between two decimal numbers.
2.What is the position of the Stack Pointer after the PUSH instruction?
The address line is 02 less than the earlier value.
3.What is the position of the Stack Pointer after the POP instruction?
The address line is 02 greater than the earlier value.
AIM:
To write an Assembly Language Program (ALP) To perform a subtraction operations between two
decimal numbers.
ALGORITHM
EXP.NO :
DATE :
FLOWCHART
1005 INC SI
100A DAS
100B INC SI
100E HLT
OUTPUT:
INPUT OUTPUT
ADDRESS DATA ADDRESS DATA
1100 15
1102 08
1101 07
RESULT:
Thus to perform a subtraction operations between two decimal numbers is performed and result is stored.
2. Write a program to mask the 0th and 7th bit using 8051?
MOV A,#data
ANL A,#81
MOV DPTR,#4500
MOVX @DPTR,A LOOP: SJMP LOOP
AIM:
To write a perform addition of two 3*3 matrix
ALGORITH:
1. Initialize the pointer only for data and result
2. Load AL with count
3. Add two matrix by each element
EXP.NO :
DATE :
FLOWCHART
1010 INC DI
1011 INC SI
1012 DEC CL
1016 HLT
OUTPUT:
INPUT OUTPUT
ADDRESS DATA ADDRESS DATA
1100 1150 02 02 1150 04
1101 1151 02 02 1151 04
1102 1152 02 02 1152 04
1103 1153 02 02 1153 04
1104 1154 02 02 1154 04
1105 1155 02 02 1155 04
1106 1156 02 02 1156 04
1107 1157 02 02 1157 04
1108 1158 02 02 1158 04
RESULT:
Thus to write a perform addition of two 3*3 matrix is performed and result is stored
Each of the four DMA channels of 8257 has one terminal count register. This 16-bit register is used for
ascertaining that the data transfer through a DMA channel ceases or stops after the required number of DMA
cycles.
5. Define ROM?
A memory that stores binary information permanently. The information can be read from this memory
but cannot be altered.
6. What is an Assembler?
A computer program that translate an assembly language program from mnemonics to the binary
machine code of a computer.
AIM:
To write a perform subtraction of two 3*3 matrix
ALGORITHM:
1. Initialize the pointer only for data and result
2. Load AL with count
3. sub two matrix by each element
EXP.NO :
DATE :
FLOWCHART
1010 INC DI
1011 INC SI
1012 DEC CL
1016 HLT
OUTPUT:
INPUT OUTPUT
ADDRESS DATA ADDRESS DATA
1100 1150 02 02 1150 00
1101 1151 02 02 1151 00
1102 1152 02 02 1152 00
1103 1153 02 02 1153 00
1104 1154 02 02 1154 00
1105 1155 02 02 1155 00
1106 1156 02 02 1156 00
1107 1157 02 02 1157 00
1108 1158 02 02 1158 00
RESULT:
Thus To Perform Subtraction Of Two 3*3 Matrix Is Performed And Result Is Stored.
1. How many bytes of internal RAM and ROM supported by 8051 micro controller?
128 bytes of internal RAM and 4 bytes of ROM.
EXP.NO :
DATE :
AIM:
To write an Assembly Language Program (ALP) for performing the Addition operation of floating
point.
ALGORITHM:
EXP.NO :
DATE :
FLOWCHART
100B INC SI
100E HLT
OUTPUT:
INPUT OUTPUT
ADDRESS DATA ADDRESS DATA
1100 99
RESULT:
Thus To write an Assembly Language Program (ALP) for performing the Addition operation of floating
point is performed and result is stored.
VIVA-VOCE QUESTIONS & ANSWERS
3.What are the signals used in input control signal & output control signal?
Input control signal :STB (Strobe input) IBF (Input buffer full)
Output control signal :OBF (Output buffer full),ACK,) INTR (Interrupt request).
ALGORITHM
Initialize the MSBs of difference to 0
Get the first numbers
Subtract the second number from the first number.
EXP.NO :
DATE :
FLOWCHART
100B INC SI
HLT
OUTPUT:
INPUT OUTPUT
ADDRESS DATA ADDRESS DATA
1100 33
1101 00
RESULT:
Thus To write an Assembly Language Program (ALP) for performing the subtraction operation of two
byte numbers is performed and result is stored.
VIVA-VOCE QUESTIONS & ANSWERS
AIM:
To write an Assembly Language Program (ALP) for performing the multiplication operation of floating
point
ALGORITHM
Get the multiplier.
Get the multiplicand
Initialize the product to 0.
Product = product + multiplicand
EXP.NO :
DATE :
FLOWCHART
1006 MUL BX
EXP.NO :
DATE :
100D HLT
OUTPUT:
INPUT OUTPUT
ADDRESS DATA ADDRESS DATA
1100 14
RESULT:
Thus To write an Assembly Language Program (ALP) for performing the multiplication operation
floating point is performed and result is stored.
Strobed input
2.Display modes
Left entry (Type writer mode)
Right entry (Calculator mode)
4.What operation is performed during first T -state of every machine cycle in 8085 ?
In 8085, during the first T -state of every machine cycle the low byte address is latched into an external
latch using ALE signal.
10.What is USART?
Universal Synchronous Asynchronous Receiver.
AIM:
To write an Assembly Language Program (ALP) to sort a given array in ascending order.
ALGORITHM:
a. Load the array count in two registers C1 and C2.
b. Get the first two numbers.
c. Compare the numbers and exchange if necessary so that the two numbers are
in ascending order.
d. Decrement C2.
e. Get the third number from the array and repeat the process until C2 is 0.
EXP.NO :
DATE :
FLOWCHART
OUTPUT:
INPUT OUTPUT
ADDRESS DATA ADDRESS DATA
2000 44 44 2000 11 11
2002 11 11 2002 22 22
2004 33 33 2004 33 33
2006 55 55 2006 44 44
2008 22 22 2008 55 55
RESULT:
To write an Assembly Language Program (ALP) to sort a given array in Ascending order is performed and
result is stored.
VIVA-VOCE QUESTIONS & ANSWERS
1. What is a microcontroller?
A device which contains the microprocessor with integrated peripherals like memory, serial ports,
parallel ports, timer/counter, interrupt controller, data acquisition interfaces like ADC, DAC is called
microcontroller.
6. What is a flag?
The data conditions, after arithmetic or logical operations, are indicated by setting or resetting the flip-
flops called flags.
7. Why are the program counter and the stack pointer 16-bit registers?
Memory locations for the program counter and stack pointer have 16-dit address. So the PC and SP have
16-bit registers.
9. Specify the number of registers and memory cells required in a 128 x 4 memory chip?
Number of registers=128
Memory cells required is 128 x 4=512
AIM:
To write an Assembly Language Program (ALP) to sort a given array in descending order.
ALGORITHM:
a. Load the array count in two registers C1 and C2.
b. Get the first two numbers.
c. Compare the numbers and exchange if necessary so that the two numbers are
in descending order.
d. Decrement C2.
e. Get the third number from the array and repeat the process until C2 is 0.
f. Decrement C1 and repeat the process until C1 is 0.
EXP.NO :
DATE :
FLOWCHART
OUTPUT:
INPUT OUTPUT
ADDRESS DATA ADDRESS DATA
2000 44 2000 44
2001 44 2001 44
2002 11 2002 55
2003 11 2003 55
2004 33 2004 33
2005 33 2005 33
2006 55 2006 22
2007 55 2007 22
2008 22 2008 11
2009 22 2009 11
RESULT:
To write an Assembly Language Program (ALP) to sort a given array in Ascending order is performed and
result is stored.
1.Why a latch is used for the output port and a tri-state buffer is used for the input port?
A latch is necessary to hold the output data for display. The input data byte is obtained by enabling a tri-
state buffer and placed in the accumulator.
3. How will the port number be affected if we decode the high-order address lines A15 –A8 rather than A7 –
A0?
The port address will remain the same because the I/O port address is duplicated on both segments of
the address bus.
AIM:
To search a specific byte in an array of numbers.
ALGORITHM:
a. Load the array count in a register C1.
b. Get the first two numbers.
c. Compare the numbers and exchange if the number is small.
d. Get the third number from the array and repeat the process until C1 is 0.
FLOWCHART
EXP.NO :
DATE :
1008 INC SI
1017 OR AL,00H
1019 JZ LOOP
101F HLT
1024 HLT
OUTPUT:
INPUT OUTPUT
ADDRESS DATA ADDRESS DATA
EXP.NO :
DATE :
1050 30 1200 01
1051 08
1100 06
1101 07
1102 09
1103 90
1104 80
1105 30
1106 40
1107 34
RESULT:
Thus To search a specific byte in an array of numbers is performed and result is stored.
The instruction ADD a will add the content of the accumulator to itself; this is equivalent to multiplying
by 2.
2.What operation can be performed by using the instruction SUB A? Specify the status of Z and CY?
The instruction SUB a will clear the accumulator. The flag status will be CY = 0 and
Z = 1.
6. Why the number of out ports in the peripheral-mapped I/O is restricted to 256 ports?
The number of output ports in the peripheral I/O is restricted to 256 ports because the operand of the
OUT instruction is 8-bits; it can have only 256 combinations.
7. If an input and output port can have the same 8-bit address how does the 8085 differentiate between the
ports?
In The 8085 differentiates between the input and output ports of the same address by the control signal.
The input port requires the RD and the output port requires the WR signal.
8.What are the control signals necessary in the memory mapped I/O?
RD, WR, I/O (low)
9. What is SIM?
SIM: Set interrupt Mask. It is a 1-byte instruction. Used for three functions
a.To set the Mask
b.To reset the flip flop
c.Implement the I/O
10.What is RIM?
RIM: Read Interrupt Mask Used for three functions
a.To read interrupt mask
b.To identify the pending interrupt
c.To receive serial data
AIM:
To write an Assembly Language Program (ALP) for To check whether the password is correct or not
EXP.NO :
DATE :
OUTPUT
INPUT OUTPUT
ADDRESS DATA ADDRESS DATA
RESULT:
Thus To Check Whether The Password Is Correct Or Not Is Performed Successfully.
AIM:
To display the date using VBMB -15 kit.
ALGORITHM
Interfacing VBMB-15 to 8086
EXP.NO :
DATE :
INPUT:
OUTPUT:
AFTER EXECUTION THE TIME IS 23:59:55 AND DATE IS 25:01:15
AFTER 5 SECONDS THE DATE WILL BE DISPLAYED 26:01:15 IN VBMB-15
RESULT:
Thus to display the date using vbmb -15 kit is performed successfully.
2. Right Entry Mode :In the right entry mode, the first entry to be displayed is
entered on the rightmost display.
4. What are the different types of methods used for data transmission?
The data transmission between two points involves unidirectional or bi-directional transmission of
meaningful digital data through a medium.
(a)Simplex (b)Duplex (c)Half Duplex
AIM:
To find display the RAM SIZE of the system.
ALGORITHM
Steps to be followed in program
EXP.NO :
DATE :
OUTPUT
RESULT:
Thus to find display the ram size of the system is performed successfully.
AIM:
To provide the time delay using counters.
ALGORITHM
EXP.NO :
DATE :
INPUT OUTPUT
ADDRESS DATA ADDRESS DATA
RESULT:
Thus to provide the time delay using counters is performed successfuly.
Poll Method
6.Specify the bit of a control word for the 8255, which differentiates between the I/O mode and the BSR mode?
BSR mode D7=0,
I/O mode D5=1
7.Write the input /output feature in Mode 9 for the 8255A PPI?
Outputs are latched
Inputs are not latched
AIM:
To write an assembly language program in 8086 to Traffic light control
ALGORITHM:
Turn on Go signal in Road 1.
Call the delay sub routine 2
EXP.NO :
DATE :
FLOWCHART
RESULT:
Thus the program of traffic light program performed successfully.
6. Discuss the advantages and disadvantages of Harvard and Von Neuman architectures.
Harvard architecture uses separate memories for program and data memory whereas
Von Neuman uses same program and data memory. Therefore Harvard is faster compared to other one.
AIM:
To write an assembly program to make the stepper motor run in forward and reverse direction.
ALGORITHM:
Step 1 : Load the ‘HL’ pair wit value from table
Step 2 : Move it to ‘B’ register for setting the counter
Step 3 : Move the memory value to accumulator and display it by control word
EXP.NO :
DATE :
Step 4 : Load ‘DE’ register pair with FFFF for starting delay subroutine
Step 5 : Run the delay loop control D-register becomes zero.
Step 6 : Increment ‘H’ address for next value from table
Step 7 : Jump on no zero
Step 8 : When B = 0, go to start and restart the program
FLOWCHART
MOV DS,AX
EXP.NO :
DATE :
MOV AL,80H
MOV DX,CWRD
OUT DX,AL
MOV DX,PORTA
MOV AL,88H
UP CALL DELAY
ROL AL,01H
OUT DX,AL
JMP UP
UP1 DEC BX
JNZ UP1
DEC CX
JNZ UP2
RET
MOV AH,4CH
INT 21H
Input:
Input address Value Direction Input address Value Direction
0A Forward 09 Reverse
06 direction 05 direction
05 06
09 0A
RESULT:
Thus To write an assembly program to make the stepper motor run in forward and reverse direction is
performed successfully.
2. What is USART?
USART is an integrated circuit. It is a programmable device its function and specifications for serial I/O
can be determined by writing instructions in its internal registers.
5. Define Baud?
The rate at which the bits are transmitted is called Baud.
AIM:
To write an Assembly Language Program (ALP) to interface of keyboard and display.
ALGORITHM :
1. Initialize the counter
2. Set 8279 for 8 digit character display, right entry
3. Set 8279 for clearing the display
4. Write the command to display
EXP.NO :
DATE :
FLOWCHART:
SET UP POINTER
DELAY
100B OUT C2,AL C6,C0,10 Set command word & out it.
C3
DELAY PROGRAM:
ADDRESS LABEL MNEMONICS OPCODE COMMENT
OUTPUT:
EXP.NO :
DATE :
ADDRESS DATA
1200 FF FF FF FF
1204 98 68 C8 7C
1208 FF FF 1C 29
120C FF FF FF FF
RESULT:
Thus To write an Assembly Language Program (ALP) to interface of keyboard and display is performed
successfully.
1. What are the three basic multiprocessor configurations that the 8086 can support?
(May/June 2009, Nov/Dec 2003)
Coprocessor Configuration, Closely Coupled Configuration, Loosely Coupled Configuration
5.What are the necessary steps to be followed to form a complex, loosely coupled multiprocessor system?
1) A single 8086 or 8088 or an independent processor such as an 8089.
2) A cluster of processors consisting of an 8086 or 8088 and a coprocessor (such as an 8087) and/or
independent processors.
3) A cluster of independent processors (such as two 8089s).
6.What is computer network?
By using serial links, many microcomputer systems can communicate with each other and share some of the
same hardware and software resources. Large systems of this type are called computer networks
7.Define communication protocol.
Commands and data are transmitted as message packets. Each packets normally includes several fields
containing such things as synchronization characters, the sender’s address, the receiver’s address, the text, error
detection characters, and termination characters.
8. What is need for 8087 coprocessor with 8086/8088 single chip microprocessor?
Although the 8086 and 8088 are powerful single chip microprocessors, their instruction set is not sufficient to
effectively satisfy some complex applications.
9. Write short notes on CBRQ and BCLK signals.
CBRQ (COMMON BUS REQUEST): instructs the arbiter if there are any other arbiters of lower priority
requesting the use of the multi-master system bus.
BCLK ( BUS CLOCK): The multi-master system bus clock to which all multi-master system bus interface
signals are synchronized.
10. Define a Instruction Cycle
Instruction cycle : Time required to complete the execution of an instruction. One instruction cycle consists of 3
to 6 machine cycles.
AIM:
To display the Printer Status in the display
ALGORITHM
To divides my 3digit number by 100 giving me my, hundredth digit
To prints the hundredth digit
To save AX on the stack
To restore AX on stack
To divides the remainder by 10 giving me my tens digit
To prints my tens digit
EXP.NO :
DATE :
RESULT:
Thus to perform the program for the printer is performed successfuly.
AIM:
To write an assembly language program for serial communication between microprocessor.
ALGORITHM:
1. Start the program
2. Move 36H al reg & output value from AL to CE
3. Move the data 10 to AL reg
4. Output value from AL to CB register
5. Move the data 00 to AL reg & output value from AL to c8
EXP.NO :
DATE :
FLOWCHART:
START
STOP
TRANSMITTER
ADDRESS LABEL MNEMONICS OPCODE COMMENT
accumulator
1005 MOV AL,10 Move code word 10 to the
accumulator
1008 OUT C8,AL Send code word C8 from
accumulator
100A MOV AL,00 Move code word 00 to the
accumulator
100D OUT C8,AL Send code word C8 from
accumulator
100F MOV AL,AE Move code word AE to the
accumulator
1012 OUT C2,AL Send code word C2 from
accumulator
1014 MOV AL,87 Move code word 87 to the
accumulator
1017 OUT C2,AL Send code word C2 from
accumulator
1019 LOOP IN AL,C2 Move the value of C2 to AL
RECEIVER
ADDRESS LABEL MNEMONICS OPCODE COMMENT
OUTPUT:
INPUT OUTPUT
ADDRESS DATA ADDRESS DATA
1022 41 1500 41
RESULT:
Thus the assembly language program for serial communication between microprocessor.
VIVA-VOCE QUESTION AND ANSWERS
1.What is a Microprocessor?
Microprocessor is a program-controlled device, which fetches the instructions from memory, decodes
and executes the instructions. Most of the Micro Processors are single- chip devices.
AIM:
To write an assembly language program for parallel communication between microprocessor.
ALGORITHM
1. Start the program
2. Move the data of 82H into AL
3. Output data from AL to 26H
4. Move the data of 3FH into AL
5. Output data from AL to 20H
6. Move the data of 22H into AL
7. Output data from AL to 3FH
EXP.NO :
DATE :
FLOWCHART: START
STOP
PROGRAM FOR PARALLEL COMMUNICATION
TRANSMITTER:
ADDRESS LABEL MNEMONICS OPCODE COMMENT
1000 MOV AL,82H Move code word 82 to the
accumulator
1003 OUT 26,AL Send code word 26H from
accumulator
1005 MOV AL,3F Move code word 3F to the
accumulator
1008 OUT 20,AL Send code word 20H from
EXP.NO :
DATE :
accumulator
100A LOOP IN AL,22H Move the value of 22 to AL
RECEIVER
ADDRESS LABEL MNEMONICS OPCODE COMMENT
OUTPUT:
INPUT OUTPUT
ADDRESS DATA ADDRESS DATA
1013 EF 1200 EF
1201 EF
1202 EF
1203 EF
1204 EF
1205 EF
1206 EF
1207 EF
EXP.NO :
DATE :
RESULT:
Thus the assembly language program for parallel communication between microprocessor was verified.
4) AEN–address enable
5) ADSTB - address strobe
3.Write short notes on RQ/GT0 and RQ/GT1 (I/O) signals. (Dec-06)
These pins are used by other processors in a multi-processor organization. Local bus masters of other
processors force the processor to release the local bus at the end of the processors current bus cycle.
Each pin is bi-directional and has an internal pull up resistors. Hence they may be left un-connected.
4. Give a short notes on QS0, QS1 (O) signals. (May-08)
Queue Status is valid during the clock cycle after which the queue operation is performed. QS0, QS1
provide status to allow external tracking of the internal 8086 instruction queue.
5.What are the principle types of I/O.
Programmed I/O
Interrupt I/O
Block transfers and DMA.
6.Write the working procedure of programmed I/O?
CPU requests I/O operation, I/O module performs operation, I/O module sets status bits, CPU checks
status bits periodically, I/O module does not inform CPU directly
7.Write the basic operations of interrupt I/O?
i) CPU issues read command
ii) I/O module gets data from peripheral whilst CPU does other work
iii) I/O module interrupts CPU
iv) CPU requests data
v) I/O module transfers data
8.Define DMA.
To execute an instruction that causes a single byte or word to be transferred and the other is to execute
a sequence of instruction that causes a special system component associated with the interface to
transfer a sequence of bytes or word to or from a predesignated block of memory locations.
9.What is memory buffer?
If several bytes or word are required, then it is necessary to transfer them to a set of consecutive
locations in memory before they are used.
10.What do you meant by double buffering?
Some operations may employ more than one memory buffer so that one buffer can be input to while
other buffer is being operated on; then, when the buffer being filled is full, it can be operated on and
the input can be directed to the other buffer.
AIM:
To write an Assembly Language Program (ALP) to interface ADC with 8086 microprocessor.
ALGORITHM
1. Initialaize the ADC
2. Start the conversion.
3. Wait for end of conversion.
4. Store the converted digital output.
FLOWCHART:
START
EXP.NO :
DATE :
EXP.NO :
DATE :
OUTPUT:
RESULT:
Thus the Assembly Language Program (ALP) to interface ADC with 8086 microprocessor was verified.
EXP.NO :
DATE :
4.What is fqp?
Fqp-forward queue pointer, which indicates the next element in the list, and a process control pointer
for locating a block of memory that is used to store important information related to the process.
8.What is semaphore?
A flag used to reverse a shared resource is called semaphore and the operation of requesting and
releasing the resource are commonly known as the P and V semaphore operators.
AIM:
To write an Assembly Language Program (ALP) to interface DAC with 8086 microprocessor.
ALGORITHM
1. Send 00h to DAC to generate lower amplitude.
2. Call delay based on required frequency.
3. Send FFh to DAC to generate higher amplitude.
4. Call delay based on required frequency.
5. Repeat the above steps continuously.
FLOWCHART:
START
STOP
EXP.NO :
DATE :
OUTPUT:
RESULT
Thus, the programs for Interfacing DAC operations have been executed using 8086 Microprocessor.
EXP.NO :
DATE :
4.What is interfacing?
An interface is a shared boundary between the devices which involves sharing information. Interfacing
is the process of making two different systems communicate with each other.
5.What is control word? What is the purpose of control word written to control register in 8255?
Control word: It is a word stored in a register (control register) used to control the operation of a program
digital device.
AIM:
To write an assembly language program to add the two 8-bit numbers using 8051 Microcontroller
instruction set.
ALGORITHM
1. Clear C-register for carry.
2. Move the first data to Accumulator.
3. Add the second data with Accumulator.
4. Store the sum in memory pointed by DPTR.
FLOWCHART:
START
Clear PSW
Select Register
Bank
Load A and R 0
with 8- bit datas
Add A & R 0
STOP
EXP.NO :
DATE :
4103 ADD A,# 22 24,22 Add the second data with the data
in A register.
410E MOVX @DPTR,A F0,80 Move the output data to the data
pointer.
OUTPUT:
INPUT OUTPUT
ADDRESS DATA ADDRESS DATA
4101 11
4500 33
4103 22
410A 33 4501 77
410C 44
RESULT
Thus, the assembly language program to add the two 8-bit numbers using 8051 instruction set was
written and executed successfully.
EXP.NO :
DATE :
3.What is swapping?
The procedure of fetching the chosen program segments or data from the secondary storage into the
physical memory is called ‘swapping’.
8.What are the different peripheral interfacing used with 8086 microprocessor? May/June 13
8255 PPI, 8259 PIC, 8251 USART, 8279 Key board display controller and 8253 Timer/ Counter – Interfacing with
8085 - A/D and D/A converter interfacing.
9.What are the applications of D/A converter interfacing with 8255? MAY/JUNE 12
1. Microprocessor based process control system
2. Stepper motor interfacing
3. Centronic interfacing
The Interrupt Service Register (ISR) stores all the levels that are currently being serviced.
EXP.NO :
DATE :
AIM:
To write an assembly language program to subtract the two 8-bit numbers using 8051 Microcontroller
instruction set.
ALGORITHM
1. Clear C-register for carry.
2. Move the first data to Accumulator.
3. Subtract the second data with Accumulator.
4. Store the sum in memory pointed by DPTR.
FLOWCHART:
START
NO
IS CF=1
INCREMENT THE
BORROW REGISTER
STORE RESULT IN
MEMORY
STOP
EXP.NO :
DATE :
4103 SUBB A,#10 94,10 Subtract the second data with the
accumulator.
OUTPUT:
INPUT OUTPUT
ADDRESS DATA ADDRESS DATA
4102 20
4500 10
4104 10
RESULT
Thus, the assembly language program to subract the two 8-bit numbers using 8051 instruction set was
written and executed successfully.
EXP.NO :
DATE :
6.Name any four electronic devices which are used to interface high power devices with microprocessor.
1. Power transistor 2. Power MOSFET 3. Solid state relay.
2.
7.What is a load cell?
A load cell consist of strain gauges which are arranged in bridge form and when Excited by DC input, it
produces an output voltage proportional to the weight or load placed on it
10. Why is each channel in DMA controller restricted to 19Kbytes of data transfer?
Mostly we use 8085 and 8086 microprocessor to interface with DMA controller.
EXP.NO :
DATE :
AIM:
To write an assembly language program to multiply the two 8-bit numbers using 8051 Microcontroller
instruction set.
ALGORITHM
1. Clear C-register for carry.
2. Move the first data to Accumulator.
3. Move the second data to B-register.
4. Multiply the second data with Accumulator.
5. The higher order of the result is in B-register.
6. The lower order of the result is in Accumulator.
7. Store the sum in memory pointed by DPTR.
FLOWCHART:
START
GET MULTIPLIER
IN ACCR
GET MULTIPLICAND
IN B REG
MULTIPLY A WITH B
STORE RESULT IN
MEMORY
STOP
EXP.NO :
DATE :
OUTPUT:
INPUT OUTPUT
ADDRESS DATA ADDRESS DATA
4100 02
4500 80
4102 40
RESULT
Thus, the assembly language program to multiply the two 8-bit numbers using 8051 instruction set was
written and executed successfully.
EXP.NO :
DATE :
AIM:
To write an assembly language program to divide the two 8-bit numbers using 8051 Microcontroller instruction
set.
ALGORITHM
1. Clear C-register for carry.
2. Move the first data to Accumulator.
3. Move the second data to B-register.
4. Multiply the second data with Accumulator.
5. The remainder of the result is in B-register.
6. The quotient of the result is in Accumulator.
7. Store the sum in memory pointed by DPTR.
FLOWCHART:
START
GET DIVIDEND IN
ACCR
GET DIVISOR IN B
REG
DIVIDE A BY B
STORE
QUOTIENT &
REMAINDER IN
MEMORY
STOP
EXP.NO :
DATE :
OUTPUT:
INPUT OUTPUT
ADDRESS DATA ADDRESS DATA
4100 08
4500 02
4102 04
RESULT
Thus, the assembly language program to divide the two 8-bit numbers using 8051 instruction set was written
and executed successfully.
EXP.NO :
DATE :
10. What is the purpose of control word written to control register in 8255?
The control words written to control register specify an I/O function for each I/O port. The bit D7 of the
control word determines either the I/O function of the BSR function.
EXP.NO :
DATE :
AIM
To write an assembly language program to perform and operation using microcontroller instruction set.
ALGORITHM
1. Move the data to Accumulator.
2. Perform AND operation with accumulator.
3. Move the accumulator output to the memory 4500H.
FLOWCHART:
START
STOP
EXP.NO :
DATE :
OUTPUT:
INPUT OUTPUT
ADDRESS DATA ADDRESS DATA
4100 87 4500 06
4102 7E
RESULT
Thus the assembly language program to perform and operation using microcontroller instruction set was
written and executed successfully.
EXP.NO :
DATE :
5. What is swapping?
The procedure of fetching the chosen program segments or data from the secondary storage into the
physical memory is called ‘swapping’.
10. What are the different types of methods used for data transmission?
Simplex, Duplex, Half Duplex
EXP.NO :
DATE :
Aim:
To perform assembly language program for or operation in 8-bit 8051 microcontroller kit
ALGORITHM
1. Start the program
2. Get the two input value
3. Compare 0=1
4. Store the result
5. Stop the program
FLOWCHART:
START
Compare 0=1
STOP
EXP.NO :
DATE :
OUTPUT:
INPUT OUTPUT
ADDRESS DATA ADDRESS DATA
4100 2F 4500 0F
4102 45
RESULT:
Thus To perform assembly language program for or operation in 8-bit 8051 microcontroller kit is executed
successfully.
EXP.NO :
DATE :
AIM:
To perform assembly language program for square the given number in 8-bit 8051 microcontroller kit
ALGORITHM
1. Start the program
2. Get the input value
3. Square the number
4. Store the result
5. Stop the program
FLOWCHART:
START
STOP
EXP.NO :
DATE :
MOVX A,@DPTR
MOV B,A
MUL AB
INC DPTR
MOVX @DPTR,A
MOV A,B
MOVX @DPTR,A
END
OUTPUT:
INPUT OUTPUT
ADDRESS DATA ADDRESS DATA
8000 02 8001 04
RESULT:
Thus To perform assembly language program square the given number in 8-bit 8051 microcontroller kit is
performed sucessfuly.
EXP.NO :
DATE :
4. Name any four electronic devices which are used to interface high power devices with
microprocessor
1.Power transistor 2. Power MOSFET 3. Solid state relay.
7. Can an input port and an output port have the same port address?
No, in peripheral mapped input / output, the peripheral is defined with an 8 bit address input and
output devices are different. So, different ports are assigned as input and output port.
10. What are the enhanced features of 8254 programmable timer compared to 8253
Operating frequency 0 - 10 MHz.
Uses H-MOS technology.
Read-Back command available.
Reads and writes of the same counter can be interleaved.
EXP.NO :
DATE :
Aim:
To perform assembly language program for cube the given number in 8-bit 8051 microcontroller kit
ALGORITHM
1. Start the program
2. Get the input value
3. cube the number
4. Store the result
5. Stop the program
FLOWCHART:
START
STOP
EXP.NO :
DATE :
OUTPUT:
INPUT OUTPUT
ADDRESS DATA ADDRESS DATA
8000 02 8001 08
RESULT:
Thus to perform assembly language program for cube the given number in 8-bit 8051 microcontroller kit
EXP.NO :
DATE :
5. What are maximum address space and data bus width of 8086 processor
Maximum address space = 220 = 1 MB
Data bus width - 16 bit
6. What does it imply if the states of 8086 signals - BHE and A o arc at 0 and 1,
respectively
When BHE = 0 and A0=l, 8086 can access even byte address (D o - D7)
8. What is the storage space required to store the interrupt vectors of 8086
In 8086, 256 interrupt types required (256 x 4) 1024 bytes storage space.
AIM
To write an assembly language program to find the 1’s and 2’s complement of an 8-bit number using
microcontroller instruction set.
ALGORITHM
1. Move the data to Accumulator.
2. Complement the accumulator.
3. Move the one’s complement output to the memory 4500H.
4. Add 01H with accumulator.
5. Move the two’s complement output to the memory 4501H.
FLOWCHART:
START
STOP
EXP.NO :
DATE :
4103 MOV DPTR,#4500 90,45,00 Move the value 4500 into DPTR
register.
OUTPUT:
INPUT OUTPUT
ADDRESS DATA ADDRESS DATA
4100 BB 4500 44
4501 45
RESULT
Thus the assembly language program to find the 1’s and 2’s complement of an 8-bit number using 8051
instruction set was written and executed successfully.
EXP.NO :
DATE :
7. What is the operation carried out when 8086 executes the instruction MOVSW
MOVSW - Move word string.
8. What is the operation carried out when 8086 executes the instruction MOVSB
MOVSB - Move String Byte
9. What is pipelining
Fetching the next instruction while the current instruction executes is called pipelining.
AIM:
To convert BCD number into ASCII by using 8051 micro controller
ALGORITHM:
Save contents of all registers which are used in the routine
Get the data in AL register and make AH equal to 00
Use AAM instruction to convert number in its decimal equivalent in the unpacked format.
Add 30H in each digit to get its ASCII equivalent
Display digit one by one using function 2 of INT 21H
Restore contents of registers.
FLOWCHART:
EXP.NO :
DATE :
ANL A,#0FH
MOV R0,A
MOV A,B
ANL A,#0F0H
SWAP A
MOV R1,A
OUTPUT:
INPUT OUTPUT
ADDRESS DATA ADDRESS DATA
RESULT:
The given number is converted into ASCII using 8051 microcontroller kit is performed succecssfully.
EXP.NO :
DATE :
3. Name the signals used by 8086 to control the data bus buffers
DT/ R - Data transmit/receive
DEN -Data enable