<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Wed, 03 Aug 1994 13:58:52 EST
From   : Stephen Quan <quan@...>
Subject: Re: Stack behaviour.

James F writes :

> > Just a bit of trivial, what is the value of A in the following :
> > 
> >        LDA #0
> >        PHA
> >        PLP
> >        PHP
> >        PLA
> >        RTS      <--- optional if you are writing in BBC basic.
> > 
> > For some who have a BBC, you can try it out and find out!
> > If not, I will post the answer tomorrow.
> 
> Without looking at my Beeb or my emulator , I'd say that this should
> leave the value &30 in A.

Pretty perculiar isn't it?!  But this goes back to what you guys
were saying that the BRK flag always seems to be set.  Hmmmm... I
find that truly odd, there must be a case when the BRK flag is clear.
What happens if I tried to disable interrupts?  ie.

          LDA #4
          PHA
          PLP
          PHP
          PLA
          RTS

Would be the value of A be?  &34???  or something else?

If it is &34 then are we going to assume that the BRK flag is always
set or can anyone give a case where the BRK flag will be cleared???
-- 
Stephen Quan
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>