EXPERIMENT NO - 05
AIM: To find the largest number in an array of data using 8085 instruction set.
APPARATUS REQUIRED: - 8085 Development Kit.
PROCEDURE:-The following steps are required to implement the program-
1. Enter the numbers at memory location2500, 2501, 2502, and 2503.
2. The result is to be stored in the memory location2450.
3. Used GOTO Command for Executions.
4. Reset to be used before seeing the result at the location 2450.
PROGRAM:-
Memory Machine Label Mnemonics Operands Comments
address codes
2000 21,00,25 LXI H,2500 H Address for count in H-L pair.
2003 4E MOV C,M Count in register C.
2004 23 INX H Address of 1st number in H-L
pair.
2005 7E MOV A,M 1st number in accumulator.
2006 0D DCR C Decrement count.
2007 23 LOOP INX H Address of next number.
2008 BE CMP M Compare next number with
previous maximum.
Is next number >previous
maximum?
2009 D2, 0D, 20 JNC AHEAD No, larger number is in
accumulator. Go to the liable
AHEAD.
200C 7E MOV A,M Yes, get larger number in
accumulator.
200D 0D AHEAD DCR C Decrement count.
200E C2, 07, 20 JNZ LOOP
2011 32,50, 24 STA 2450 H Store result in 2450 H.
2014 76 HLT Stop
OBSERVATION TABLE:-
Data Insert data
location
2500 03
2501 98
2502 75
2503 99
RESULT:-
LOCATION RESULT
2450 99
PRECAUTIONS:-
1. Enter the opcode/data carefully.
2. Don’t pull out any IC and components from any of the experiment at board.
3. Handle all test equipment’s carefully.
4. In case of electric fire, switch off the main supply then use fire extinguisher.
5. Switch off the kit when not in use.
INDUSTRIAL APPLICATION:-
1. To enhance the capability of assembly language programming for industrial / research use.
2. Finding out the modes in industries.
VIVA QUESTIONS:-
1. What is the instruction?
2. What are the different addressing modes?
3. How the instructions are classified?
4. Three 8 bit numbers P, Q and R are stored in the B, C and D registers respectively. Find the
largest number and store it in the H register.
EXPERIMENT NO - 06
AIM: - To find the Smallest number in an array of data using 8085.
APPARATUS REQUIRED: - 8085 Development Kit.
PROCEDURE:-The following steps are required to implement the program-
1. Enter the numbers at memory location 2501, 2502, and 2503.
2. The result is to be stored in the memory location 2450.
3. Used GOTO Command for Executions.
4. Reset to be used before seeing the result at the location 2450.
PROGRAM:-
Memory Machine Label Mnemonics Operands Comments
address codes
2000 21,00,25 LXI H,2500 H Get address for count in H-l pair.
2003 4E MOV C,M Count in register C.
2004 23 INX H Get address of 1st number in H-L
2005 7E MOV A,M 1st number in accumulator
2006 0D DCR C Decrement count.
2007 23 LOOP INX H Address of next number in H-L
pair.
2008 BE CMP M Compare next number with
previous smallest. Is previous
smallest less than next number?
2009 DA,0D,20 JC AHEAD Yes, smaller number in
accumulator. Go to AHEAD.
200C 7E MOV A,M No, get next number in
accumulator.
200D 0D AHEAD DCR C Decrement count
200E C2,07.20 JNZ LOOP
(2007)
2011 32,50,24 STA 2450 H Store smallest number in 2450 H
2014 76 HLT Stop
OBSERVATION TABLE:-
Data Insert data
location
2500 03
2501 86
2502 58
2503 75
RESULT:-
LOCATION RESULT
2450 58
PRECAUTIONS:-
1. Enter the opcode/data carefully.
2. Don’t pull out any IC and components from any of the experiment at board.
3. Handle all test equipment’s carefully.
4. In case of electric fire, switch off the main supply then use fire extinguisher.
5. Switch off the kit when not in use.
INDUSTRIAL APPLICATION:-
1. To enhance the capability of assembly language programming for industrial / research use.
2. Finding out the modes in industries.
VIVA QUESTIONS:-
1. Why data bus is bi-directional?
2. What are the function of address bus and data bus?
3. What are the different addressing modes?
4. How the instructions are classified?
SIGNATURE OF LAB INCHARGE