position in buffer

Discussion in 'Assembly Language Programming (ALP) Forum' started by and11, Oct 31, 2011.

  1. and11

    and11 New Member

    Oct 31, 2011
    Likes Received:
    Trophy Points:
    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?


Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice