[Rpcemu] Code review

Tom Walker tommowalker at yahoo.co.uk
Wed Feb 22 01:39:06 PST 2012


>       if (!(opcode&0xFF0)) /*No shift*/
>         {
>                addbyte(0x8A); addbyte(0x0D); addlong(pcpsr+3); /*MOVB *pcpsr,%cl*/
>                generateload(opcode&0xF);
>                addbyte(0x80); addbyte(0xE1); addbyte(~0xC0); /*AND $ZFLAG+NFLAG,%cl*/
>                return 1;
>        }
>
>No shift but clears C flag.

There's an '~' missing from the comment but clearly visible in the code - it's clearing Z and N but leaving C intact.


>Second example:
> 
>                       addbyte(0x80); addbyte(0xE1); addbyte(~0xC0); /*AND $ZFLAG+NFLAG,%cl*/
> Here if temp is 0, there is no shift but it clears C flag.

Same here.


Tom 



More information about the Rpcemu mailing list