6502 - Why no "Increase A" command?

  Рет қаралды 1,446

John Squires

4 жыл бұрын

I'm making a 6502 CPU from logic gates, and I am implementing the register section right now. I have implemented it so that you can increase and decrease X and Y but not A. I have no idea why the 6502 has no INC-A command. Any ideas?

Пікірлер: 15
@vanhetgoor
@vanhetgoor 3 жыл бұрын
Looking at the 6502 processor you must come to the conclusion that it is a very Spartan piece of equipment. To the letter it is not RISC but it comes close, many things other processors have are not present in the 6502. The simplicity made it easier to work with and that is what made it loved by millions of users, but after a while the lack of speed and the absence of real IO made the 6502 not ready for the future. The Z80 lived longer and had more offspring. Only the 6800 and the 8008 have evolved into modern chips still available today. If I would have been on the team of designers I would have made it different. First of all I would give the 6502 ordinary IO, then I would make the addressability bigger and I would give it strictly separated program-memory and data-memory. (for safety) Dozens of chips all working in their own program-memory could function together with other processors on the same sheared data-memory. If in the '70's the Von Neumann-principle was put to rest we would have skipped at least 50 years of useless developments.
@CircuitBreaker256
@CircuitBreaker256 3 жыл бұрын
I guess they did what they could with what they had available. Cost was the main factor at that time. It's very simple, but it did have some nice pipeline principles. I do hate memory mapped IO though! It is a total pain.
@zombieman81
@zombieman81 3 жыл бұрын
Maybe because the X and Y registers were "designed" for indexing data and stepping up and down was considered important? Never quite got my head around 6502 beyond having a basic understanding of the instructions, despite even writing a disassembler WAY back in the past (and one for the related 65816). Maybe because I learned Z80 first which spoils you for registers... It's great seeing these sorts of projects involving these classic CPUs... I really enjoyed getting down to the bits in the 80s and early 90s on Z80 and 68000, less so on 8086 and 6502... I feel inspired to play with this sort of stuff myself, and it is amazing to think that 6502 and Z80 chips can still be bought new!
@CircuitBreaker256
@CircuitBreaker256 3 жыл бұрын
Have you looked at my Z80 Playground project? I really enjoy programming in Z80, and so do a ton load of other people!
@ian_b
@ian_b 3 жыл бұрын
As an 80s Z80 kid (Sinclair ZX81/Spectrum) the 6502 has always looked horribly primitive to me :)
@williamsquires3070
@williamsquires3070 3 жыл бұрын
Simple; 1) you can increase the Accumulator with CLC ADC #$01 and, 2) The X/Y registers are used to index into memory for the more complicated addressing modes, but the Accumulator is not used to index into memory, so the designers saw no point in wasting more silicon with an implementation to increment or decrement it. That’s my guess, but you’d have to ask the actual designers, assuming any are still alive. 🤔
@CircuitBreaker256
@CircuitBreaker256 3 жыл бұрын
I think you are right, and I saw that in a later iteration or the 6502 this command was added. It's clear to me that they absolutely were driven by a need to keep the transistors to a minimum! Nice surname, by the way! ;-)
@ralphyrocket5770
@ralphyrocket5770 3 жыл бұрын
best name EVER!!!!
@JustWasted3HoursHere
@JustWasted3HoursHere 3 жыл бұрын
Man, all I did during the lockdown was organize my closets. I feel like a failure! LOL.
@lachlanc.3509
@lachlanc.3509 3 жыл бұрын
That's a cool display. Where did you get it from?
@CircuitBreaker256
@CircuitBreaker256 3 жыл бұрын
I made it!
@GianmarioScotti
@GianmarioScotti 4 жыл бұрын
Did you think about ordering the necessary components from companies like DigiKey or Mouser? Anyway, keep up the excellent work!
@CircuitBreaker256
@CircuitBreaker256 4 жыл бұрын
Yes, I'll probably have to go that way. I've always just gone the ebay-from-china route in the past because it has been so cheap and easy.
@ithaca2076
@ithaca2076 4 жыл бұрын
@@CircuitBreaker256 check out AliExpress for cheaper more overall cheap cost. But the shipping is something from 1-3 months :)
@gorillaau
@gorillaau 3 жыл бұрын
@@ithaca2076 Aliexpress sellers seems to find the slowest plane to ship your order. Then again, wanting 100 resistors? Get 1000 for adding to your junk box. 330Ohm, 1k, 5k, and 10k values never goes astray.
КАК ДУМАЕТЕ КТО ВЫЙГРАЕТ😂
00:29
МЯТНАЯ ФАНТА
Рет қаралды 10 МЛН
Best KFC Homemade For My Son #cooking #shorts
00:58
BANKII
Рет қаралды 66 МЛН
ОБСЛУЖИЛИ САМЫЙ ГРЯЗНЫЙ ПК
1:00
VA-PC
Рет қаралды 2,5 МЛН
Как бесплатно замутить iphone 15 pro max
0:59
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 8 МЛН
Это Xiaomi Su7 Max 🤯 #xiaomi #su7max
1:01
Tynalieff Shorts
Рет қаралды 2,1 МЛН
İĞNE İLE TELEFON TEMİZLEMEK!🤯
0:17
Safak Novruz
Рет қаралды 746 М.