assembly
-
how to move a string to register in assembly language. say mov si, msg; where msg = "hello"; pls help me
Arise Awake Stop Not Till ur Goal is Reached.
-
how to move a string to register in assembly language. say mov si, msg; where msg = "hello"; pls help me
Arise Awake Stop Not Till ur Goal is Reached.
You don't put a string into a register. All you can do is put the address of the string in a register.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
how to move a string to register in assembly language. say mov si, msg; where msg = "hello"; pls help me
Arise Awake Stop Not Till ur Goal is Reached.
-
I assume that you want to load the si register with the address of a string. Please use accurate language, especially when talking about assembly language. In Win32 you should use esi and not si: char* sp_ptr="hello!"; _asm { mov esi,sp_ptr } Rilhas
How do you he's not doing it on a 286? :laugh:
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
How do you he's not doing it on a 286? :laugh:
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007You are right, I don't! :-) As you can see from his post if we want to give help right away then we have to make a lot of assumptions! I assumed Win32 (could be LINUX, or any other OS), assembly inside C (could be assembly only, why not?), 386+ code, _asm directive availability, and C-style strings (as oposed to VB strings, for example), and possibly more which I didn't even realize! The alternative would be not to give any help right away. Anyway, my post still stands as I was giving an example for Win32 which is most comonly used with Intel 386+ processors (I don't think there is any Win32 version that can run on a 286). Rilhas :-)
-
You are right, I don't! :-) As you can see from his post if we want to give help right away then we have to make a lot of assumptions! I assumed Win32 (could be LINUX, or any other OS), assembly inside C (could be assembly only, why not?), 386+ code, _asm directive availability, and C-style strings (as oposed to VB strings, for example), and possibly more which I didn't even realize! The alternative would be not to give any help right away. Anyway, my post still stands as I was giving an example for Win32 which is most comonly used with Intel 386+ processors (I don't think there is any Win32 version that can run on a 286). Rilhas :-)
Oh yeah. I'm not bashing your post at all. It was just a litle jab at what you mentioned here. The mountain of assumptions we all-to-often have to make to answer what they think is a simple question.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
How do you he's not doing it on a 286? :laugh:
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007Dave Kreskowiak wrote:
How do you he's not doing it on a 286? :laugh:
:laugh::laugh::laugh: