Computer Organization & Assembly Language - Detailed Notes
1. Bus Structure (Communication System)
Address Bus:
- CPU memory ka address send karta hai
- Sirf one-way hota hai
- Width jitni zyada hogi utni memory access hogi
📌 Example: CPU → 2000H location select karta hai
- CPU memory ka address send karta hai
- Sirf one-way hota hai
- Width jitni zyada hogi utni memory access hogi
📌 Example: CPU → 2000H location select karta hai
Data Bus:
- Actual data transfer hota hai CPU aur memory ke darmiyan
- Bi-directional hota hai
📌 Example: value 55H transfer
- Actual data transfer hota hai CPU aur memory ke darmiyan
- Bi-directional hota hai
📌 Example: value 55H transfer
Control Bus:
- Control signals carry karta hai
- READ / WRITE / INTERRUPT signals
📌 Example: Memory READ signal activate
- Control signals carry karta hai
- READ / WRITE / INTERRUPT signals
📌 Example: Memory READ signal activate
2. Memory Organization
Memory Segmentation:
- Memory ko logical parts mein divide kiya jata hai
- CS (Code), DS (Data), SS (Stack)
📌 Benefit: structured programming
- Memory ko logical parts mein divide kiya jata hai
- CS (Code), DS (Data), SS (Stack)
📌 Benefit: structured programming
Physical Address Calculation:
- Real memory location calculate hoti hai
- Formula used:
👉 Segment × 16 + Offset
- Real memory location calculate hoti hai
- Formula used:
👉 Segment × 16 + Offset
Types of Memory:
- RAM (temporary)
- ROM (permanent)
- Cache (fast memory)
- RAM (temporary)
- ROM (permanent)
- Cache (fast memory)
3. CPU Registers
General Registers:
- AX (Accumulator)
- BX (Base register)
- CX (Counter)
- DX (Data register)
📌 Used in arithmetic and data handling
- AX (Accumulator)
- BX (Base register)
- CX (Counter)
- DX (Data register)
📌 Used in arithmetic and data handling
Special Registers:
- IP (Instruction Pointer)
- SP (Stack Pointer)
📌 Control program execution
- IP (Instruction Pointer)
- SP (Stack Pointer)
📌 Control program execution
Flags Register:
- Zero Flag (ZF)
- Carry Flag (CF)
- Sign Flag (SF)
📌 Result status show karta hai
- Zero Flag (ZF)
- Carry Flag (CF)
- Sign Flag (SF)
📌 Result status show karta hai
4. Addressing Modes
Immediate Mode:
- Direct value instruction mein hoti hai
📌 MOV AX, 5
- Direct value instruction mein hoti hai
📌 MOV AX, 5
Direct Mode:
- Memory address directly given hota hai
📌 MOV AX, [1000H]
- Memory address directly given hota hai
📌 MOV AX, [1000H]
Indirect Mode:
- Register ke through memory access hoti hai
📌 MOV AX, [BX]
- Register ke through memory access hoti hai
📌 MOV AX, [BX]
Indexed Mode:
- Base + Index use hota hai
📌 Used in arrays
- Base + Index use hota hai
📌 Used in arrays
5. Assembly Instructions
MOV Instruction:
- Data transfer karta hai
📌 MOV AX, BX
- Data transfer karta hai
📌 MOV AX, BX
ADD Instruction:
- Addition perform karta hai
📌 ADD AX, 2
- Addition perform karta hai
📌 ADD AX, 2
SUB Instruction:
- Subtraction karta hai
📌 SUB AX, 1
- Subtraction karta hai
📌 SUB AX, 1
LOGIC Instructions:
- AND, OR, XOR operations
- AND, OR, XOR operations
6. Program Control Flow
JMP:
- Unconditional jump
📌 Program flow change
- Unconditional jump
📌 Program flow change
CALL:
- Function/procedure call
📌 Return address save hota hai stack mein
- Function/procedure call
📌 Return address save hota hai stack mein
RET:
- Function se wapas aana
- Function se wapas aana
7. Stack Memory
Definition:
- LIFO structure (Last In First Out)
📌 Example: plates stack
- LIFO structure (Last In First Out)
📌 Example: plates stack
PUSH Operation:
- Data stack mein store hota hai
📌 PUSH AX
- Data stack mein store hota hai
📌 PUSH AX
POP Operation:
- Data stack se nikalta hai
📌 POP AX
- Data stack se nikalta hai
📌 POP AX
Usage:
- Function calls
- Interrupt handling
- Function calls
- Interrupt handling

0 Comments