Re: Holiday Game
- From: NathanCBaker@xxxxxxxxx
- Date: Fri, 5 Dec 2008 11:14:07 -0800 (PST)
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.
.
- References:
- Re: Holiday Game
- From: Herbert Kleebauer
- Re: Holiday Game
- From: NathanCBaker
- Re: Holiday Game
- From: Herbert Kleebauer
- Re: Holiday Game
- From: NathanCBaker
- Re: Holiday Game
- From: Herbert Kleebauer
- Re: Holiday Game
- From: NathanCBaker
- Re: Holiday Game
- From: Herbert Kleebauer
- Re: Holiday Game
- From: NathanCBaker
- Re: Holiday Game
- From: Herbert Kleebauer
- Re: Holiday Game
- Prev by Date: Re: Holiday Game
- Next by Date: Re: Holiday Game
- Previous by thread: Re: Holiday Game
- Next by thread: Re: Holiday Game
- Index(es):
Relevant Pages
|