[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] what's wrong with this code?



man, 15,.08.2005 kl. 12.07 +0200, skrev Johan Klockars:
> >>already in SV mode. Second, when you do trap #0 and get to the 'set_ssp'
> >>function, forcing the SV mode in the save SR stack will cause havoc once
> >>the RTE instruction executes. Why? Because now you use the SV stack in
> >>user code after the SR is reloaded and the user stack is just lost. Bad!
> >>Bad! Bad! ;-)
> >>
> >>    
> >>
> >Odd, you've got it, many thanks! Finally someone who took a look at the code
> >  
> >
> 
> But has he, really? I have nothing against being proved wrong, but...
> 
> Odd's wrong (or very unclear) on one point, which is that the user stack 
> would somehow be 'lost'.

 Thats because the RTE should pull USER stack from the stackframe, but
since the SV bit is forced in the stored SR, you now use this as a SUPER
stack. I.e. the USER stack is lost.



 Best Regards,
Odd Skancke