0% found this document useful (0 votes)
118 views2 pages

8085 Programs

The document contains assembly language code for various arithmetic operations on an 8085 microprocessor including addition, subtraction, division, multiplication, and sorting numbers in ascending and descending order. Labels are used to mark loops and subroutines. Instructions include data transfer, arithmetic, logic, and branching operations.

Uploaded by

apjcra
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
118 views2 pages

8085 Programs

The document contains assembly language code for various arithmetic operations on an 8085 microprocessor including addition, subtraction, division, multiplication, and sorting numbers in ascending and descending order. Labels are used to mark loops and subroutines. Instructions include data transfer, arithmetic, logic, and branching operations.

Uploaded by

apjcra
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

8085 Programs: [L1] ADDITION LXI MOV INX MOV MVI ADD JNC [Loop] INR [Loop] 4152

MOV STA HLT H,4150 A,M H B,M C,00 B 410C C STA A,C 4153

JNC 410D INR [L1] DCR JNZ [L2] STA MOV STA HLT DIVISION LDA 4150 MOV B,A LDA 4151 MVI C,00 [L1] CMP B JC 4112 [L2] SUB B INR C JMP 4109 [L1] [L2] STA 4152 MOV A,C STA 4153 HLT SMALLEST NO. LXI H,4150 MOV B,M INX H MOV A,M DCR B [L1] INX H CMP M JC 410D [L2] MOV A,M [L2] DCR B JNZ 4107 [L1] STA 4200 HLT D C 4108 4150 A,D 4151

LARGEST NO. LXI MOV INX MOV DCR [L1] INX CMP JNC [L2] MOV [L2] DCR JNZ [L1] STA HLT H,4150 B,M H A,M B H M 410D A, M B 4107 4200

ASCENDING ORDER LDA 4200 MOV B,A DCR B MOV C,B LXI H,4201 MOV A,M INX H CMP M JC 4114 MOV D,M MOV M,A DCX H MOV M,B INX H DCR C JZ 411B JMP 4109 [L4] L2 DCR B JZ 4122 [L1] JMP 4105 [L5] L1 HLT

SUBTRACTION LXI H, 4150 MOVA,M INX H MOV B,M MVI C,00 SUB B JNV 4110 [loop] INR C CMA ADI 01 [loop] STA 4152 MOV A,C STA 4153 HLT MULTIPLICATION MVI A,00 MVI B,data 1 MVI C,data 2 MVI D, 00 [L2] ADD B

L5 L4

[L3]

L3 [L2]

DESCENDING ORDER LDA MOV DCR MOV LXI MOV INX CMP JNC 4200 B,A B C,B H,4201 A,M H M 4114

L5 L4

[L3] MOV D,M MOV M,A DCX H MOV M,B INX H DCR C JZ 411B

L3 [L2]

JMP 4109 [L4] L2 DCR B JZ 4122 [L1] JMP 4105 [L5] L1 HLT

You might also like