Re: 6502 stack register at reset

From: silverdr_at_wfmh.org.pl
Date: Sat, 25 Nov 2017 21:34:33 +0100
Message-Id: <02732266-553B-4E8A-B198-215AE80659CC@wfmh.org.pl>
> On 2017-11-25, at 20:59, Gerrit Heitsch <gerrit@laosinh.s.bawue.de> wrote:
> 
> On 11/25/2017 08:50 PM, didier derny wrote:
>> Is there any 6502 starting with an initialized stack register at reset ?
>> a few month ago I was struggling with a strange bug...
>> the program was crashing or working randomly
>> I discovered that the machine had a stack register never initialized
> 
> As far as I know, the RESET squence on about every 6502 system contains the following 2 commands:
> 
> LDX #$FF
> TXS
> 
> to make sure the stack pointer contains the proper value.

Yup - I even remember wondering why.. long time ago. That's until I read somewhere that the SP is not initialised on H/W reset.

-- 
SD! - http://e4aws.silverdr.com/


       Message was sent through the cbm-hackers mailing list
Received on 2017-11-25 21:01:13

Archive generated by hypermail 2.2.0.