[hatari-devel] A new disassembler in Hatari

Nicolas Pomarède npomarede at corp.free.fr
Sun Nov 21 18:38:09 CET 2010


Le 21/11/2010 00:38, Eero Tamminen a écrit :

>> At line 23811, I see your "extending" the string, which is ok since the
>> buffer is 1024 bytes, but gcc is detecting the index was computed from
>> strlen and gives a warning ; maybe there's a way to write this in a
>> different way ?
>
> I'm not getting that warning with my compiler (GCC 4.3.2).
> What happens if you declare all the optionPos* variables as const?
>

Hello,
I'm using a recent 4.5.1 gcc version, there might be some more advanced 
warnings than in previous version, but I don't see your point of 
declaring optionPos* as const, there's no reference to them in :

         int             len = strlen(dbuf);
         while(len < position) {
                 dbuf[len++] = ' ';

>> This parameter (as well as the other options available in your code)
>> could of course be stored using some settings in hatari.cfg (Eero, if
>> you fell like doing it ?)
>
> Would somebody still want to use the UAE disassembler?
>
> If yes, the option could be either a define set by CMake or be a Hatari
> [Debugger] section configuration option.  How likely people would be
> to change that?

I think a Debugger section could be useful. We should keep a way to go 
back to the built in UAE's debugger, in case we want to compare some 
difference of behaviour (bugs ?) between both disassembler.

>> I checked that devpac handled both notations, but could it be possible
>> to not add paranthesises around absolute addresses ?
>
> The parenthesis notion is one used by the debugger itself for
> breakpoints, so I guess it would be more consistent. :-)
>

 From all the asm sources I saw during years of coding on both ST and 
Amiga, I never saw anyone using this notation, so I will add 
doptNoBrackets to Diss68kOptions, I think it's less confusing for the 
people/coders coming from devpac/monst interested in using the debugger.


>> 2) adding .l suffix after address
>> 	jsr       ($1ec50).l
>> 	move.w    d1,($212ec).l
>>
>> As most common case is to have 32 bit addr, could you remove the .l when
>> the address is 32 bit, and just add a .w when the address is a short 16
>> bit one ?
>
> IMHO clearer to have those always.  Things align then similarly etc.

How do they align better ? In the following case, putting .l after 
$212ec wouldn't make things better to me for example :
	move.w d1,$212ec
	move.w d2,$ffff8240.w

But that's all a matter of taste anyway, and setting doptNoBrackets 
remove the .l also, so that's nice.


Nicolas



More information about the hatari-devel mailing list