[hatari-devel] debugger evaluate command

Eero Tamminen eerot at users.berlios.de
Wed Oct 7 21:00:47 CEST 2009


Hi,

On Tuesday 06 October 2009, Thomas Huth wrote:
> Who really really needs octal numbers??? Even for BCD, you don't need
> them (BCD uses digits up to 9). ==> Keep the code simple, don't
> implement octal support.

Well, the calculator already supported octal, adding support for that to
debugger parsing would have been just couple of lines (scanf()).

But I removed octal & ascii support from calculator along with
modulo & power operations.  I'll continue removing more features
from it to make it simpler.

I also changed  < & > operators to move familiar << & >> operators.


> > > >> * Calculations are done as doubles and signed longs.  Former
> > > >> means that divisions can have funny results when printed (due to
> > > >> conversion accuracy) and that shift and logical OR & AND
> > > >> operations support values only up to 0x7fffffff.  If floating
> > > >> point calculations aren't needed, I could change everything to
> > > >> use (signed) long longs?
>
> I rather wonder whether we need negative numbers in the debugger?

To store intermediate calculation results that are negative?
I'll try with long longs.


> > > I'm not sure we should put too much extra evaluate commands in
> > > hatari ; of course it's your time, so you're free to do it, but in
> > > the end I think they're some much more complete calculators
> > > solutions that the user can run from another terminal if he really
> > > wants to (adding that to the fact that debugger mode is used by a
> > > very low percentage of users I guess)
>
> I second that.

Well, it works fine already. :-)  I'm just in process of integrating it
better to Hatari and removing redundant features in the process.

Supporting the same internal Hatari variables as conditional breakpoints
does might be a useful new feature though for things like video line cycle
calculation.


> > Is there any free calculator that supports both binary & shift
> > operations and oct/dec/hex modes conveniently?  I haven't found any.
>
> Both, gcalctool and galculator support binary, oct and hex modes, too.
> None of them is perfect, but using both, I always got finally the
> result of my calculations.

Haven't used either as they seem to be GUI tools.  Do they have history?


	- Eero



More information about the hatari-devel mailing list