Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

ASCII capturing

I have an ASCII string coming in on COM1 of my computer. I need to isolate 3 numbers out of that string. The string will change but the values i need will always be in the same place within the string. Anybody have any ideas how i can isolate certain values out of an ASCII string and place them into memory somewhere?
Any help would be great.
Thanks

Comments

  • BitByBit_ThorBitByBit_Thor Posts: 2,444Member
    : I have an ASCII string coming in on COM1 of my computer. I need to
    : isolate 3 numbers out of that string. The string will change but
    : the values i need will always be in the same place within the
    : string. Anybody have any ideas how i can isolate certain values out
    : of an ASCII string and place them into memory somewhere?
    : Any help would be great.
    : Thanks
    :

    Have 3 variables and copy the values to them from the correct position in the string. If ebx (for example) points to your string, then you could use relative addressing to get specific values.
    Example in NASM:
    [code]
    mov al, [leftbr]ebx + [italic]position of first value[/italic][rightbr]
    mov [value1], al
    [/code]
    This will take one byte from the ascii string at the specified value and copy it to a byte variable named value1
    Best Regards,
    Richard

    The way I see it... Well, it's all pretty blurry
Sign In or Register to comment.