Re: 6502 stack register at reset

From: Spiro Trikaliotis <ml-cbmhackers_at_trikaliotis.net>
Date: Sun, 26 Nov 2017 14:13:38 +0100
Message-ID: <20171126131338.GF7692@hermes.local.trikaliotis.net>
Hello Segher,

* On Sat, Nov 25, 2017 at 04:15:52PM -0600 Segher Boessenkool wrote:
> On Sat, Nov 25, 2017 at 10:03:49PM +0100, Spiro Trikaliotis wrote:
[...]
> > That is, if you have RAM at $0100-$01FF and you do not use that area for
> > anything else, why should the CPU crash at all as long as you do not
> > push more than 256 byte on it?
[...]
> See for example the 6530.  It has 64 bytes of RAM and some I/O registers,
> and only 10 address lines.  The "simple" example in the MCS6500 hardware
> manual has the RAM selected at xxxxxx0x11xxxxxx and the I/O at
> xxxxxx1111xxxxxx.  So, stack accesses to $01c0..$01ff go to RAM, but also
> e.g. zero-page accesses to $00c0..$00ff go to the *same* RAM.

That falls under the clause "if you have RAM at $0100-$01FF and you do
not use that area for anything else, ..." ;)

I was just curious to find out if the CPU might have a problem here, for
example with a wrap-around while doing a JSR or an RTS, and the values
being stored to/restored from $0100 and $01FF.

There is nothing know about this, is it?
 
> Long story short: older 6500 systems did not have a 256 byte stack, they
> didn't even have 256 bytes RAM total :-)

Now I've read that he was building on a replica 1. 

I looked here: http://www.brielcomputers.com/wordpress/?cat=17

The memchart
(http://www.brielcomputers.com/wordpress/wp-content/uploads/2010/04/memchart.jpg)
does not mention that $0100 - $01FF would not be RAM that is not reused.

Thus, again, I do not see why there should be a problem here, especially
if the code already worked on a SYM1.

Regards,
Spiro.

-- 
Spiro R. Trikaliotis
http://www.trikaliotis.net/

       Message was sent through the cbm-hackers mailing list
Received on 2017-11-26 14:00:03

Archive generated by hypermail 2.2.0.