The original 6502 uses an 8-bit data bus and 16-bit address bus, allowing it to address up to 64 KB of memory space. The processor communicates with RAM, ROM and I/O devices through these buses. The 6502's clock and reset circuitry are also essential parts of a working computer.
The official WDC material is useful for distinguishing the historical NMOS 6502 from later 65C02 implementations; the latter contains several behavioral improvements, so your page should label a historical diagram specifically as MOS Technology 6502 (NMOS) if that's what you're describing
असली 6502 में 8-बिट डेटा बस और 16-बिट एड्रेस बस का इस्तेमाल होता है, जिससे यह 64 KB तक के मेमोरी स्पेस को एड्रेस कर सकता है। प्रोसेसर इन बसों के ज़रिए RAM, ROM और I/O डिवाइस के साथ कम्युनिकेट करता है। 6502 की क्लॉक और रीसेट सर्किटरी भी एक काम करने वाले कंप्यूटर के ज़रूरी हिस्से हैं।
WDC का ऑफिशियल मटीरियल पुराने NMOS 6502 और बाद के 65C02 वर्शन के बीच फ़र्क समझने में काम आता है; बाद वाले वर्शन में कई तरह के सुधार किए गए हैं, इसलिए अगर आप पुराने वर्शन के बारे में बता रहे हैं, तो आपके पेज पर डायग्राम को खास तौर पर MOS Technology 6502 (NMOS) के तौर पर लेबल किया जाना चाहिए।
आप इसके काम करने के तरीके को छह आसान स्टेप्स में समझ सकते हैं:
1. पावर दी जाती है
पावर सप्लाई CPU, मेमोरी और सपोर्टिंग लॉजिक को ज़रूरी वोल्टेज देती है।
2. क्लॉक शुरू होती है
क्लॉक सर्किट टाइमिंग सिग्नल बनाता है जिसका इस्तेमाल प्रोसेसर करता है। 6502 अपने ऑपरेशन अपनी क्लॉक फेज़ के साथ तालमेल बिठाकर करता है। WDC के डॉक्यूमेंटेशन के अनुसार, 6502 आर्किटेक्चर को PHI2 क्लॉक इनपुट की ज़रूरत होती है।
3. रीसेट होता है
जब कंप्यूटर रीसेट होता है, तो 6502 अपने प्रोसेसर की स्थिति को शुरू करता है और मेमोरी में स्टोर रीसेट वेक्टर से अपना शुरुआती प्रोग्राम एड्रेस लेता है।
4. CPU इंस्ट्रक्शन लेता है (fetch)
6502 A0–A15 पर एक एड्रेस डालता है।
ROM उस एड्रेस को देखता है और उससे जुड़ा इंस्ट्रक्शन बाइट D0–D7 पर डालता है।
6502
│
│ एड्रेस
▼
ROM
│
│ इंस्ट्रक्शन बाइट
▼
6502
5. CPU इंस्ट्रक्शन को पूरा करता है (execute)
6502 का इंटरनल कंट्रोल लॉजिक इंस्ट्रक्शन को डिकोड करता है और अपने रजिस्टर और ALU का इस्तेमाल करके ज़रूरी ऑपरेशन करता है।
उदाहरण के लिए:
LDA #$10
इसका मतलब है:
एक्युमुलेटर में हेक्साडेसिमल 10 लोड करें।
इसके बाद CPU कैलकुलेशन कर सकता है या रजिस्टर और मेमोरी के बीच डेटा ट्रांसफर कर सकता है।
6. CPU RAM और I/O के साथ कम्युनिकेट करता है
अगर इंस्ट्रक्शन को RAM से डेटा चाहिए:
6502
│
│ एड्रेस
▼
RAM
│
│ डेटा
▼
6502
आउटपुट डिवाइस के लिए:
6502
│
│ एड्रेस + डेटा
▼
I/O इंटरफ़ेस
│
├──► डिस्प्ले
├──► कीबोर्ड
├──► सीरियल पोर्ट
└──► अन्य हार्डवेयर
यह बेसिक फ़ेच → डिकोड → एग्जीक्यूट → मेमोरी/I/O साइकिल लगातार दोहराया जाता है।
You can explain the operation on the webpage in six simple steps:
1. Power is applied
The power supply provides the required voltage to the CPU, memory and supporting logic.
2. Clock starts
The clock circuit generates the timing signal used by the processor. The 6502 performs its operations in synchronization with its clock phases. WDC's documentation notes that the 6502 architecture requires the PHI2 clock input.
3. Reset occurs
When the computer is reset, the 6502 initializes its processor state and obtains its starting program address from the reset vector stored in memory.
4. CPU fetches an instruction
The 6502 puts an address on A0–A15.
The ROM sees that address and places the corresponding instruction byte onto D0–D7.
6502
│
│ Address
▼
ROM
│
│ Instruction byte
▼
6502
5. CPU executes the instruction
The 6502's internal control logic decodes the instruction and performs the required operation using its registers and ALU.
For example:
LDA #$10
means:
Load hexadecimal 10 into the accumulator.
The CPU can then perform calculations or move data between registers and memory.
6. CPU communicates with RAM and I/O
If the instruction requires data from RAM:
6502
│
│ Address
▼
RAM
│
│ Data
▼
6502
For an output device:
6502
│
│ Address + Data
▼
I/O Interface
│
├──► Display
├──► Keyboard
├──► Serial port
└──► Other hardware
This basic fetch → decode → execute → memory/I/O cycle repeats continuously.
अपने एजुकेशनल वेबपेज के लिए, आप 32 KB RAM + 32 KB ROM वाले एक आसान उदाहरण का इस्तेमाल कर सकते हैं:
एड्रेस डिवाइस मकसद
$0000–$7FFF RAM प्रोग्राम/डेटा/वर्क एरिया
$8000–$BFFF I/O कीबोर्ड, डिस्प्ले, सीरियल वगैरह
$C000–$FFFF ROM ऑपरेटिंग प्रोग्राम / मॉनिटर
$FFFA–$FFFF ROM इंटरप्ट और रीसेट वेक्टर
सही मेमोरी मैप एक डिज़ाइन का चुनाव है, न कि कोई यूनिवर्सल 6502 कॉन्फ़िगरेशन। अलग-अलग 6502 कंप्यूटरों में अलग-अलग तरह के अरेंजमेंट का इस्तेमाल किया जाता था।
पुराने 6502 सिस्टम इस फ्लेक्सिबिलिटी को दिखाते हैं। उदाहरण के लिए, KIM-1 में 6502 के साथ मेमोरी और I/O सर्किटरी का इस्तेमाल किया गया था, जबकि बाद के सिस्टम में बसों और पेरिफेरल डिवाइस के ज़रिए प्रोसेसर को बढ़ाया गया।
For your educational webpage, you could use a simple 32 KB RAM + 32 KB ROM example:
Address Device Purpose
$0000–$7FFF RAM Program/data/work area
$8000–$BFFF I/O Keyboard, display, serial
$C000–$FFFF ROM Operating Code / monitor
$FFFA–$FFFF ROM Interrupt and reset vector
The exact memory map is a design choice rather than a universal 6502 configuration. Different 6502 computers used different arrangements.
Historical 6502 systems demonstrate this flexibility. For example, the KIM-1 used the 6502 together with memory and I/O circuitry, while later systems expanded the processor through buses and peripheral devices.