Question about strings...

[b][red]This message was edited by user_Ru at 2003-12-8 14:5:27[/red][/b][hr]
[b][red]This message was edited by user_Ru at 2003-12-8 14:0:27[/red][/b][hr]
Hello!
I have two questions regarding strings, so here they are:

1. How should I convert a numerical value (example: 123) to string form for printing on-screen...? And...

2. Say I have two strings:

string1 db 'abc123', '$'
string2 db 'xyz456', '$'

How would I concatenate them...? I have a very poor understanding of how the SI/DI registers work, so I'm having a bit of trouble here...

Any help would be greatly appreciated... BTW, if this has been asked recently (I think I read a similar message not too long ago), do tell... :)

Thanks!

EDIT: Oops! I didn't think there was such a recent thread regarding my first question... I just scrolled down the page and there it was:
http://www.programmersheaven.com/c/MsgBoard/read.asp?Board=1&MsgID=229706&Setting=A9999F0001

Anyway, I'll go read that and if I have any doubts, I'll be sure to ask... Thanks! ;)

EDIT AGAIN: OK, I read it, but I'd still like to know how to convert this value using SI/DI... That'll be all... :D


Comments

  • : [b][red]This message was edited by user_Ru at 2003-12-8 14:5:27[/red][/b][hr]
    : [b][red]This message was edited by user_Ru at 2003-12-8 14:0:27[/red][/b][hr]
    : Hello!
    : I have two questions regarding strings, so here they are:
    :
    : 1. How should I convert a numerical value (example: 123) to string form for printing on-screen...? And...
    :
    : 2. Say I have two strings:
    :
    : string1 db 'abc123', '$'
    : string2 db 'xyz456', '$'
    :
    : How would I concatenate them...? I have a very poor understanding of how the SI/DI registers work, so I'm having a bit of trouble here...
    :
    : Any help would be greatly appreciated... BTW, if this has been asked recently (I think I read a similar message not too long ago), do tell... :)
    :
    : Thanks!
    :
    : EDIT: Oops! I didn't think there was such a recent thread regarding my first question... I just scrolled down the page and there it was:
    : http://www.programmersheaven.com/c/MsgBoard/read.asp?Board=1&MsgID=229706&Setting=A9999F0001
    :
    : Anyway, I'll go read that and if I have any doubts, I'll be sure to ask... Thanks! ;)
    :
    : EDIT AGAIN: OK, I read it, but I'd still like to know how to convert this value using SI/DI... That'll be all... :D
    :
    :
    :
    [blue]I have some conversion code on www.codexxi.com

    To concatenate two strings you need room which will fit both strings. Thne copy first string with REP MOVSB and then loading only SI, copy again the second one. DI will points to the end of the first string. Do not forget to put the '$' after both copies.[/blue]
Sign In or Register to comment.

Howdy, Stranger!

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

Categories

In this Discussion