Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/31/00 16:10
Read: times


 
#1358 - RE: about the stack
> I'm not sure whether this is true or not, because I mainly use
> 51's and not 52's, but to access the top half of ram you have
> to use indirect addressing. If your stack ends up higher than
> 7f, you will a)write over the SFR's and b) when the ret
> instruction reads the return address you have no idea what it
> will return. (Somebody let me know if that is true, please)

No, one of the advantages of the 52 is that the additional Internal RAM is available to the stack. If SP exceeds 7Fh, it will be referring to Internal RAM addresses in the range of 80h - FFh. SP always points to Internal RAM, never to an SFR address.

Additionally, any memory accessed via indirect addressing is always Internal RAM--you cannot address an SFR by indirect addressing (although sometimes I wish you could, somehow).

Craig Steiner

List of 6 messages in thread
TopicAuthorDate
about the stack            01/01/70 00:00      
RE: about the stack            01/01/70 00:00      
RE: about the stack            01/01/70 00:00      
RE: about the stack            01/01/70 00:00      
RE: about the stack            01/01/70 00:00      
RE: about the stack            01/01/70 00:00      

Back to Subject List