Re: Question about jumps
- From: Markus Pitha <ngNOSPAM@xxxxxxxxxx>
- Date: Thu, 31 Aug 2006 16:09:11 +0200
randyhyde@xxxxxxxxxxxxx wrote:
Your problem, as others have pointed out, is that you're not to the
point yet where you understand the difference between the string
representation of an integer and the integer itself.
I understand it, but obviously it's in assembler language more complicated
than I thought, but it's my target to learn exactly these basic things.
stdout.put( "Enter an integer:" );
stdin.geti32(); // Read integer from stdin into EAX.
shl( 1, eax ); // Multiply EAX by two
stdout.put( "eax = " );
stdout.puti32( eax );
So why should I deal with assembler, when I could solve it with C-like
methods? That's not what I want to learn.
Now you get to see the effect of the shl instruction without having to
learn all the stuff needed to write your own integer input and output
routines. Sure, at some point you ought to be able to write your own
input and output routines, but for right now the integer I/O routines
in the HLA stdlib are *perfect* for the job.
It's not my target to see what's happened when I type in a number and see
the result on stdout. That's what computer newbies are probably interested
in but I want to understand what the little gremlins in the background are
doing while this happens.
Regards,
Markus
.
- Follow-Ups:
- Re: Question about jumps
- From: randyhyde@xxxxxxxxxxxxx
- Re: Question about jumps
- From: Dragontamer
- Re: Question about jumps
- References:
- Question about jumps
- From: Markus Pitha
- Re: Question about jumps
- From: Evenbit
- Re: Question about jumps
- From: Markus Pitha
- Re: Question about jumps
- From: randyhyde@xxxxxxxxxxxxx
- Question about jumps
- Prev by Date: Re: Question about jumps
- Next by Date: Displaying string
- Previous by thread: Re: Question about jumps
- Next by thread: Re: Question about jumps
- Index(es):
Relevant Pages
|