0% found this document useful (0 votes)
3 views7 pages

8085 Microprocessor Arithmetic Programs

Uploaded by

gwagon620
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views7 pages

8085 Microprocessor Arithmetic Programs

Uploaded by

gwagon620
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

MICROPROCESSOR PRACTICAL (CS-354) CO22370

Practical 8
Arithmetic Programs

Teacher Signature:
MICROPROCESSOR PRACTICAL (CS-354) CO22370

PROGRAM- 8
AIM: Arithmetic Programs.

Hardware Requirements:
Microprocessor 8085 (MAXEDU-01 8085 Microprocessor Training Kit).
Software Requirements:
8085 Simulator IDE

Program 8(a)

Memory Machine Mnemonics Operands Comments


Address Code
2070 2A,01,25 LHLD 2501H Get 1st 16-bit number.

2073 EB XCHG - Save 1st 16-bit number in DE.

2074 2A,03,2 LHLD 2503H Get 2nd 16-bit number in H-L.


5
2077 19 DAD D Add DE and HL.

2078 22,05,25 SHLD 2505H Store 16


bit result in memory locations 2505H and 2506H.
207B 76 HLT - Stop the execution temporarily.

1. Reset kit and fetch the lower bit of 16-bit number.

2. Save lower bit of 16-bit number in register.

Teacher Signature:
MICROPROCESSOR PRACTICAL (CS-354) CO22370

3. Fetch the upper bit of 16-bit number.

4. Add both upper bit and lower bit number.

5. Store 16-bit result in memory locations 2505H and 2506H respectively.

6. Excetution stoped and successful executed.

7. Value is in the assigned addresss.

Teacher Signature:
MICROPROCESSOR PRACTICAL (CS-354) CO22370

8(b)
Memory Machine Mnemonic Operands Comments
Address Code s

2070 2A,00,25 LHLD 2500H Get first 16-bit number in HL.

2073 EB XCHG - Save first 16-bit number in DE.

2074 2A,02,25 LHLD 2502H Get second 16-bit number in HL.

2077 7B MOV A, E Get lower byte of the first number.

2078 95 SUB L Subtract lower byte of the second number.

2079 6F MOV L, A Store the result in L register.

207A 7A MOV A, D Get higher byte of the first number.

207B 9C SBB H Subtract higher byte of second number with borrow


.
207C 67 MOV H, A Store 16-bit result in memory locations 2504H and 2
505H.
207D 22,04,25 SHLD 2504H Store 16-bit result in memory locations 2504H and 2
505H.

Teacher Signature:
MICROPROCESSOR PRACTICAL (CS-354) CO22370

2080 76 HLT - Stop the execution temporarily.

1. Reset kit and fetch first 16-bit number in register.

2. Save first 16-bit number in register.

3. Fetch second 16-bit number in register.

4. Fetch and save lower byte of the first number.

5. Subtract lower byte of the second number.

6. Store the result in L register.

Teacher Signature:
MICROPROCESSOR PRACTICAL (CS-354) CO22370

7. Move higher byte of the first number.

8. Subtract higher byte of second number with borrow.

9. Store 16-bit result in memory locations 2504H and 2505H respectively.

10. Store 16-bit result in memory locations 2504H and 2505H respectively.

11. Excetution stoped and successful executed.

12. Value is the assigned address.

Teacher Signature:
MICROPROCESSOR PRACTICAL (CS-354) CO22370

Teacher Signature:

You might also like