3

I want to know about the initial values of all the registers: A, B, C, D, E, H, L, SP and PC.

Do general purpose registers like B contain garbage values, or are they initialized to zero?

And what about PC and SP? Are they dependent on manufacturer?

Sep Roland
  • 33,889
  • 7
  • 43
  • 76
Ranveer Singh
  • 131
  • 1
  • 1
  • 9
  • 3
    PC is initialized to 0. As far as I know, the rest are random. – prl Jun 15 '20 at 12:38
  • 6
    I don't know how things are with modern processors, but a lot (most?) of the older ones didn't have any specific initial value for anything that isn't essential. Fixed initial values means extra silicon space, which costs money and/or limits other features. It's much easier to just say that there are no initial values for those registers, especially since they'll almost always be set anyways. Even if they had an initial value, you'd rarely leave it untouched before use.\ – Thomas Jager Jun 15 '20 at 12:58

1 Answers1

3

CPU registers are usually volatile, just like the main memory. So after a power-on, register contents would depend on the material used to implement the registers. Some circuits may have power-on-reset functionality built in but that would cost valuable chip real estate.

If you are using a kit for 8085, then the implementation of the monitor program would determine the initial values of the registers. In general, the monitor program does not bother clearing the contents, it simply leaves them be after the boot-up. Thus you might get same (garbage) values every time you power-up the kit.

Sep Roland
  • 33,889
  • 7
  • 43
  • 76
codeR
  • 165
  • 1
  • 1
  • 13