[hatari-devel] Handling signed values in the Debugger

Eero Tamminen eerot at users.berlios.de
Sun Aug 9 19:43:40 CEST 2009


Hi,

On Sunday 09 August 2009, npomarede at corp.free.fr wrote:
> > Maybe have "s" (signed) appended to the < or > comparison characters to
> > indicate that the comparison should be signed (both sides cast), like
> > this: "LineCycles <s 0"   and  "0 >s LineCycles"
> > ?
> > (And parser could warn if one does comparison against zero without
> > this)
>
> Well, from the cpu point of view signed number are in fact represented on
> 32 bits anyway, it's just a matter of interpretation, so I think that one
> possible way to handle this is to write for example :
>
>   (a0) = $fffffffe
>
> which is equivalent to (a0)= -2

Equality / inequality checks of course aren't a problem, I was referring to
"larger than" and "smaller than" comparisons.

While -2 is smaller than say $ff, $fffffffe certainly isn't:
	(a0) < $ff

If you're debugging program logic that uses signed comparisons / values and
you want to know exactly when some condition happens, that could make
breakpointing pretty awkward.


> I'm really not sure negative number would have a real use for now, I
> would say to let it as it is, and see later if people request them


	- Eero



More information about the hatari-devel mailing list