Hi,

I'm using nasm in a Linux 32 bits.

I have the following code :


mov , al
loop processa


Every time that processa runs I would like to append to num1 the value returned by al. How to do that ?

I have think in other way :


mov , al
mov esi, num1
inc esi
loop processa
 

How return to the inicial position of esi and get all the values in esi ? When I try to print the esi values he returns "null" because the inc goes to the position where doesn't exist any value.

Thanks

Posted on 2008-02-10 13:56:13 by Migg
First, what do you mean by "append"? If you really wish to append the value in the traditional sense, what measures are you using to ensure that adequate memory is in place and buffer overflows do not occur?

The value in ESI is always going to be null (or at least unpredictable) because you never write anything to the memory you are addressing.

What you have posted has fundamental flaws consistent with dependency and understanding on higher-level languages. I would recommend reading up on ASM basics, our ASM Book can assist with this.
Posted on 2008-02-10 16:49:51 by SpooK
spook,

thanks.

I'm experience developer in C#, perl, java ...

It is my first steps in assembly and I'm having some difficulties with it because of knowledges i have with other languages. I'm trying to do with assembly what I'm do with other languages.

Thanks for your help.

Posted on 2008-02-10 18:21:25 by Migg
You can also use a visual interpreter like this one.
Its 16 bit, but would give you some starter clues.

http://www.btinternet.com/~btketman/

Posted on 2008-02-10 20:08:09 by eek