Re: Who said registers are born equal ?

From: Percival (dragontamer5788_at_yahoo.com)
Date: 09/01/04


Date: 1 Sep 2004 01:11:54 GMT

The Wannabee wrote:
> På 1 Sep 2004 00:51:32 GMT, skrev Percival <dragontamer5788@yahoo.com>:
>
>> The Wannabee wrote:
>>
>>>> Just about doing everything to eax is faster and shorter than the
>>>> other registers.
>>>
>>>
>>>
>>>> Including adds, subtracts, multiplies and divides... Wait, you can
>>>> only divide using eax :)
>>>
>>>
>>>
>>> and multiplies via eax too, which destroy edx
>>>
>>> mov edx 30
>>> mov eax 20
>>> mul edx
>>> ;eax:edx contains answer
>>
>>
>> Did you forget
>>
>> imul ebx, edx
>
>
> Yes, I did forget it, cause I have used it only once; After reading that
> wolfgang said it was faster then mul, i used the search replace in
> RosAsm an changed all of them in one second. It turned out, only one of
> them caused a bug. Such things you can do in HLA ? Its not monofile, has
> no ide. ;-) You had to load up one crappy file after the other, oh lord
> what a mess, poor sufferers. But you are a FASMite arnt you, so HLA
> doesnt apply to you anymore ? :-))) Hehehe
>

Use the correct tool for the correct job. Write a 1 minute perl script
and apply it to every file using:
./myscript.pl *.asm

I am not at the level of perl to do this yet, however, i don't even have
to write a script. The thing is as simple as just
while(<>){$_=~s/mul/imul/;}

So i can just do it all in the command line. Just wondering, can you
twist RosAsm to change an entire C header file into one source code of
defines for your specific assembler?

By using the correct tool, (perl and other regex commands) you speed up
development time much faster than just sticking with the crappy monofile
method.

Percival



Relevant Pages

  • Point me to MAC OS X Tiger GD instructions that work
    ... Loaded fink and it can not find the gd install. ... module)since the gd fails. ... As a result of symbolic links these files are part of the gd header file ... as invoking the perl script perl configure.pl and then running make install. ...
    (comp.lang.perl.modules)
  • Re: RegExp Replace Using a Variable
    ... > OK - I am not sure how to get around this problem using regex commands. ... > Maybe a guru would know of one of the top of their head. ... > I would generate a little program from perl, ... > executable program to perform the actual work. ...
    (comp.lang.perl)
  • Re: Is there any way to use C header files in perl program?
    ... I need to use a C header file in Perl program in Unix. ...
    (perl.beginners)
  • Re: RegExp Replace Using a Variable
    ... OK - I am not sure how to get around this problem using regex commands. ... Maybe a guru would know of one of the top of their head. ... I would generate a little program from perl, ... executable program to perform the actual work. ...
    (comp.lang.perl)
  • [SLE] Cant locate Apache/Constants.pm
    ... and it compliants about Constants.pm which is part of ... Mod perl (from rpm) is installed too - how might i get this module in ... perl to make ?, anybody here done it, the header file httpd.d looks ...
    (SuSE)