I am working on the MSP430 microcontroller and was going through its architecture. In the user guide, under its features tab, there is a statement like this - "Full register access including program counter (PC), status register (SR), and stack pointer (SP)". I was under the impression that the CPU always has access to all the registers irrespective of the architecture.
My understanding of the statement may be wrong. Can anyone explain me what it means exactly?
As per the wikipedia page:
In other words, "full access" in this case means not just using
jmp-type instructions to be able to jump to a new location, but also allowing something likexor r0, #1234to directly (and probably fatally) modify the program counter.Ditto for the other special registers, except
R3, the constant generator and the only one of the four not mentioned in your quote. While all the instructions could operate on that register, it ignores writes and generates various fixed values on read (-1..2, use ofR2can also give you4and8) depending on the addressing mode used.That may seem a little strange but it's not the strangest I've ever seen. For that, you would have to investigate the RCA1802A CPU which, like the MPS430 had "general purpose" registers for specific functions but you could actually choose at run time which should be the program counter or stack pointer. It actually had no
callorretinstructions, instead it used a standard call and return technique (SCRT) to emulate it.