Go4Expert (http://www.go4expert.com/)
-   Assembly Language Programming (ALP) Forum (http://www.go4expert.com/forums/assembly-language-programming-forum/)
-   -   position in buffer (http://www.go4expert.com/forums/position-in-buffer-t27057/)

and11 1Nov2011 00:45

position in buffer
Is there anyone here that knows how to step in a buffer?
Since I have problem with putting the whole code in this editor I try to explain my problem without the whole code.

Lets say that I have a buffer declared as:


INBUFFER:    .skip 128
And I have allready placed following in the buffer: 314+555

In order to read this I step through the buffer in the positions 0 to 6. So, in my subroutines I first read 314, put it in a new buffer, OUTBUFFER, and then I put the +sign and thereafter the program shall start to read the number 5 at position 4. But this doesn't work out for me.
Here's how I try to do it.

        movl    START_INPOS, %ecx       
        movl    %ecx, %ebx
        movl    $INBUFFERT, %ebx

START_INPOS has 4, which is correct, but someone told me that I'm overwriting ebx here. And I can understand that, but how should I do this. Now when starting to read, the subroutine starts to read at position 0 again , i e 3 and then 1 and so on.....

Can anyone help me here?


All times are GMT +5.5. The time now is 12:45.