Re: Holiday Game



On Dec 5, 4:31 am, Herbert Kleebauer <k...@xxxxxxxxx> wrote:
NathanCBa...@xxxxxxxxx wrote:
The 'mov( 0 ... " is self-commenting.

Why should this be better readable than

  sub.l r0,r0
  eor.l r0,r0

This requires:

   sub.l r0,r0  ;  store 0 in r0, this is not declaring a sub-routine.
   eor.l r0,r0  ;  store 0 in r0, this is not a tail-less donkey.

If it isn't obvious that e.g. "5-5" is the same as "0" then it's
better to not do assembly programming.

In Algebra, 'func( x ) = func( x ) - func( x )' does not make any
sense.

????
Why does  g(x) = f1(x) - f2(x) doesn't  make any sense if function f1 is the
same as dunction f2?


Because, when we substitute a number for the function...

42 = 42 - 42

....this reduces to...

42 = 0

....which simply doesn't make any sense.

But 'func( x ) = 0' does.

A function f(x) which is constant zero makes the same sense as the
function f(x) = sin(x) - sin (2*pi+x)


But it wouldn't make sense if the function is re-defining "sin()" like
so:

sin( x ) = sin( x ) - sin( 2*pi + x )


But what have function to do whith subtracting two integer numbers
"sub.l r0,r0"  ?


sub: Subtracts the source from the destination and stores the result
in the destination.

When you write it as an algebraic sentence using the given argument:

destination = destination - source

r0 = r0 - r0

So, your program avoids calling "library code" by calling the superior
"Library code" instead??

No, it avoids calling program code which I also could write myself as
part of my program. If you want to write a program which is a sequence
of library calls, then there is absolutely no reason to make this calls
in assembly.

Tell that to the folks using RosAsm.

Tell that to the folks using Masm32.

And with HLA it's even more worse:

        rand.randomize();
        player.show();
        mov( true, edx );

If it would be at least

   call rand.randomize
   call player.show
   move true,edx


That is perfectly acceptable HLA syntax as long as you put ";" at the
end of the lines and you previously define "move" using the Compile-
Time Language feature.

Nathan.
.



Relevant Pages

  • Re: files,folders,paths
    ... Traceback: ... It would have been much easier if you had made source and destination ... and deleted a folder deeper in. ...
    (comp.lang.python)
  • Re: Unexpected error using ZIP for OpenVMS
    ... _not_ to have enough fuel to get to my destination, ... expected to find a fuel depot sooner than I did. ...    Different people may expect different things. ... zip warning: non-translatable vms error code: 0x181A8 ...
    (comp.os.vms)
  • Re: files,folders,paths
    ... Traceback: ... It would have been much easier if you had made source and destination ... jsut trying to make folders ...
    (comp.lang.python)
  • Re: semantics of exif tags
    ... destination when taking photos when not the subject? ...     TIFF Tag GPSImgDirection ... That's a TIFF tag, not an Exif tag. ...
    (sci.image.processing)
  • Re: AIX firewall
    ... Destination Address: 0.0.0.0 ... Destination Mask    : 0.0.0.0 ... Logging control    : no ... Subject: AIX firewall ...
    (AIX-L)