[hatari-devel] Conditional breakpoint code, please comment!

Eero Tamminen eerot at users.berlios.de
Fri Jul 10 18:17:17 CEST 2009


Hi,

On Saturday 04 July 2009, npomarede at corp.free.fr wrote:
> > Why parsing stage shouldn't give a warning if given address is >
> > 0x00ffffff? (user probably mistyped it and masking it would be
> > misleading?)
>
> When parsing, we should check only for the lowest 24 bit of the address,
> as done in the 68000, since bits 24-31 are ignored anyway.
>
> In fact, we could consider that the address needs a warning if bit 23 (0
> or 1) is not correctly extended to bit 24-31 in case those bits are not
> all 0 or all 1.

Thanks, I added the code you proposed below.


> So, valid addresses without warning would be :
>   $00ff820a, $ffff820a, $00123456

Actually, in the first value the 23th bit is set, but not the highest ones
so it will generate a warning...


> And valid addresses with a warning would be :
>   $0fff820a, $f0ff820a, $55ff820a, $ff123456, $07123456
>
> sthg like :
>
>    bit23 = ( address >> 23 ) & 1;
>    highbyte = ( address >> 24 ) & 255;
>
>    if ( ( bit23==0 && highbyte!=0 ) || ( bit23==1 && highbyte!=0xff ) )
>      print_warning ( address );
>
> With this, we're reaching the limit of the refinement we can make :)


	- Eero



More information about the hatari-devel mailing list