Replaceing charecters in assembler

Started by
1 comment, last by Nullio 22 years, 3 months ago
if I want to make an assembler routen to replace charecters inside a char* how would I do it?
  
char *s

_asm {

//what commands go here


};

   
Edited by - Nullio on January 1, 2002 4:40:00 PM
Advertisement
quote:Original post by Nullio
if I want to make an assembler routen to replace charecters
inside a char* how would I do it?

          char *s_asm {//what commands go here};   






          char *s = NULL;_asm {//what commands go here};         




Is that what you mean?




           char s[] = "ABCDEF";_asm {//what commands go here};    


Or that???




... I take it it's a homework assignment that you waited till the last minitue to finish, you need to study more.


"1-2GB of virtual memory, that's way more than i'll ever need!" - Bill Gates
The Adventure: Quite possibly the game of the century!" - The Gaming Community



Edited by - kingpin on January 1, 2002 8:46:35 PM
---------------------------------------------------------------------------------------"Advances are made by answering questions. Discoveries are made by questioning answers." - Bernhard HaischReactOS
THE EASIEST WAY IS TO WRITE IT IN C++ AND LOOK AT DISASM!!
HERE IT IS
  #include <iostream.h>#include <string.h>char* c = NULL;void main(){	c = new char[20]; strcpy(c,"EvilCrap");		__asm	{	mov         edx,dword ptr [c]        mov         byte ptr [edx+2],''a''	}		cout << c;}  

This topic is closed to new replies.

Advertisement