Assembly Language Programming with Intel 8086 Microprocessor | हिंदी में समझें
Assembly Language Programming with Intel 8086 Microprocessor | हिंदी में समझें
Assembly Language Programming क्या होता है?
Assembly Language Programming एक low-level programming method है जो instructions को mnemonic codes के रूप में represent करती है और hardware से direct communication करती है।
Intel 8086 के लिए assembly language CPU के internal architecture, registers और instruction set पर आधारित होती है।
8086 Assembly Program Structure
8086 assembly language program आम तौर पर तीन segments में divide होता है:
- Data Segment: Variables और constants declare किए जाते हैं
- Code Segment: सभी instructions यहीं लिखे जाते हैं
- Stack Segment: Temporary data और return addresses store होते हैं
8086 Program Structure Example
.MODEL SMALL .STACK 100H .DATA NUM1 DB 05H NUM2 DB 03H RESULT DB ? .CODE MAIN PROC MOV AX, @DATA MOV DS, AX MOV AL, NUM1 ADD AL, NUM2 MOV RESULT, AL MOV AH, 4CH INT 21H MAIN ENDP END MAIN
Explanation:
MOV AX, @DATA→ Data segment address को AX में load करता हैMOV DS, AX→ Data segment register set करता हैADD AL, NUM2→ AL में NUM2 जोड़ता हैINT 21H→ Program को terminate करता है
Steps to Run 8086 Assembly Program
- Code लिखें किसी text editor में (जैसे Notepad या IDE)
- Use assembler जैसे TASM/MASM to assemble it
- Link the object file to create executable (.EXE/.COM)
- Use EMU8086 या DOSBox जैसे emulator पर run करें
Assembly Language के लाभ
- Low-level hardware control
- Faster execution और optimization
- Useful for device drivers, embedded systems
- Compact and memory-efficient
Important Instructions in 8086 Programming
MOV– Data transferADD, SUB, INC, DEC– Arithmetic operationsJMP, JNZ, JE– Control instructionsINT– Software interruptsCALL, RET– Procedures
निष्कर्ष (Conclusion)
8086 Assembly Language Programming hardware-level programming सीखने का सबसे बेहतरीन तरीका है। इससे students को CPU working, register operations और memory handling की गहरी समझ मिलती है।
Instruction set और addressing modes की practice से efficient और optimized code लिखा जा सकता है।