Does 6502 have any hidden registers?

Programming the 6502 microprocessor and its relatives in assembly and other languages.
Post Reply
JustClaire
Posts: 18
Joined: 27 Feb 2020

Does 6502 have any hidden registers?

Post by JustClaire »

Hello

I have been wondering, what hidden registers does 6502 have if any?
By hidden registers i mean registers that are not available to the programmer at all, cant be directly modified or read by any instructions and are only used for internal CPU operations.
For example in a hypothetical CPU a hidden register would be a swap register used only to temporary hold register values when swapping between registers.
User avatar
BitWise
In Memoriam
Posts: 996
Joined: 02 Mar 2004
Location: Berkshire, UK
Contact:

Re: Does 6502 have any hidden registers?

Post by BitWise »

Not really. The diagram at the end of the Hanson paper shows all the registers and latches in the chip

https://projects.ncsu.edu/wcae//WCAE1/hanson.pdf

The 6502 sometimes uses ALU is temporary storage area during some operations but there aren't any hidden registers as such. Its pretty minimal in its design.
Andrew Jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs
User avatar
Dr Jefyll
Posts: 3525
Joined: 11 Dec 2009
Location: Ontario, Canada
Contact:

Re: Does 6502 have any hidden registers?

Post by Dr Jefyll »

One might consider the Instruction Register (IR) as being used only for internal operations. Unlike A X Y P and PC this register has no explicit instructions to modify it. But, as Bitwise said, it *is* noted in Hanson's diagram.

-- Jeff
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
Post Reply