Re: [hatari-devel] question about natfeats' code

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi,

On keskiviikko 22 lokakuu 2014, Nicolas Pomarède wrote:
> in hatari-glue.c, I see that in OpCode_NatFeat_ID() and
> OpCode_NatFeat_Call() we have :
> 
>          Uint16 SR = M68000_GetSR();
> then
>                  M68000_SetSR(SR);
> 
> I see that we need to read SR to check for supervisor bit, but why is
> there a call to SetSR after with the saved value "SR" ? As far as I can
> see, natfeats.c doesn't alter SR in any way, so this SetSR seems
> unnecessary to me.

Likewise, but does Exception() & M68000_BusError() called on errors
do something that might require reseting SR back to original value
on return?


	- Eero



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/