Here are Basic Assembly Language Programming Using 8085 Instruction Sets:
Assembly language programs for the Intel 8085 microprocessor involves using its instruction set to perform various tasks.
Some are Given below:
| Symbol | Hexadecimal Code | Description | |
|---|---|---|---|
| AND | 0xxx | 8xxx | And memory word to AC |
| ADD | 1xxx | 9xxx | Add memory word to AC |
| LDA | 2xxx | Axxx | Load memory word to AC |
| STA | 3xxx | Bxxx | Store AC content in memory |
| BUN | 4xxx | Cxxx | Branch Unconditionally |
| BSA | 5xxx | Dxxx | Branch and Save Return Address |
| ISZ | 6xxx | Exxx | Increment and skip if 0 |
| CLA | 7800 | Clear AC | |
| CLE | 7400 | Clear E(overflow bit) | |
| CMA | 7200 | Complement AC | |
| CME | 7100 | Complement E | |
| CIR | 7080 | Circulate right AC and E | |
| CIL | 7040 | Circulate left AC and E | |
| INC | 7020 | Increment AC | |
| SPA | 7010 | Skip next instruction if AC > 0 | |
| SNA | 7008 | Skip next instruction if AC < 0 | |
| SZA | 7004 | Skip next instruction if AC = 0 | |
| SZE | 7002 | Skip next instruction if E = 0 | |
| HLT | 7001 | Halt computer | |
| INP | F800 | Input character to AC | |
| OUT | F400 | Output character from AC | |
| SKI | F200 | Skip on input flag | |
| SKO | F100 | Skip on output flag | |
| ION | F080 | Interrupt On | |
| IOF | F040 | Interrupt Off | |
Assembly Language Program to Add Two Numbers:

Explanation:
ORG 2000H: Specifies the starting address of the program. Adjust it based on your memory layout.- Initialize data:
LXI H, 3000H: Load HL pair with the address of the first number.MOV B, M: Move the content of the memory location addressed by HL to register B.LXI H, 3001H: Load HL pair with the address of the second number.
- Addition:
ADD B: Add the content of register B to the accumulator.
- Store result:
LXI H, 4000H: Load HL pair with the address to store the result.MOV M, A: Move the content of the accumulator to the memory location.
HLT: Halt the microprocessor, indicating the end of the program.- Data section:
DB 05H: Define the first number (adjust the value as needed).DB 0AH: Define the second number (adjust the value as needed).
Assembly Language Program to Subtract Two Numbers:

Explanation:
ORG 2000H: Specifies the starting address of the program. Adjust it based on your memory layout.- Initialize data:
LXI H, 3000H: Load HL pair with the address of the minuend (the first number).MOV B, M: Move the content of the memory location addressed by HL to register B.LXI H, 3001H: Load HL pair with the address of the subtrahend (the second number).
- Subtraction:
SUB B: Subtract the content of register B from the accumulator.
- Store result:
LXI H, 4000H: Load HL pair with the address to store the result.MOV M, A: Move the content of the accumulator to the memory location.
HLT: Halt the microprocessor, indicating the end of the program.- Data section:
DB 0AH: Define the minuend (adjust the value as needed).DB 05H: Define the subtrahend (adjust the value as needed).
Discussion 0