Intel 8086 Microprocessor Programming | Structure, Modes और Example


Intel 8086 Programming क्या होता है?

8086 Microprocessor programming में Assembly language का उपयोग करके instructions लिखी जाती हैं जो CPU को tasks perform करने के लिए निर्देश देती हैं।

यह low-level language होती है जिसमें registers, memory, और flags को control किया जाता है।


8086 Assembly Language Program Structure

8086 में Assembly program आम तौर पर निम्नलिखित parts में divided होता है:

  1. Data Segment: जहाँ variables define किए जाते हैं
  2. Code Segment: जहाँ actual instructions लिखे जाते हैं
  3. Stack Segment: temporary data store के लिए उपयोग
  4. Extra Segment (optional): additional data use के लिए

8086 Programming Model

  • Registers: AX, BX, CX, DX, SI, DI, BP, SP
  • Segment Registers: CS, DS, SS, ES
  • Instruction Pointer: IP
  • Flags Register: Status और control flags

Assembly Language Syntax

  • Instruction Format: [Label:] Instruction [Operands] [; Comment]
  • Example: MOV AX, 0005H ; Move 5 to AX

8086 Programming Modes

  1. Real Mode: 1MB memory addressing, segment-offset scheme
  2. Protected Mode: Advanced (80286+) mode for larger memory
  3. 8086 केवल Real Mode में काम करता है

8086 Programming के Steps

  1. Assembler (जैसे TASM, MASM) में code लिखना
  2. Object file (.OBJ) generate करना
  3. Linker की मदद से executable (.EXE/.COM) बनाना
  4. Debugger से execute और test करना

Example Program: Add Two Numbers

MOV AL, 05H     ; AL में 5 स्टोर करें
MOV BL, 03H     ; BL में 3 स्टोर करें
ADD AL, BL      ; AL = AL + BL
MOV [3000H], AL ; Result को memory में स्टोर करें
HLT             ; Program समाप्त करें

Applications of 8086 Programming

  • Embedded systems
  • Low-level hardware control
  • Bootloaders और device drivers
  • Instruction set understanding के लिए educational use

निष्कर्ष (Conclusion)

8086 programming सीखना Microprocessor architecture और instruction execution को समझने का एक बेहतरीन तरीका है। Assembly language का अभ्यास करने से low-level hardware interaction और memory control के concepts clear होते हैं।

Related Post

Comments

Comments