User Profile

Collapse

Profile Sidebar

Collapse
timon
timon
Last Activity: Jun 16 '07, 04:24 PM
Joined: Jun 12 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • thank you!!
    but, let me ask you another question.
    if i had, for example, pointers (or another variable). how can i move this data to the registers
    ex.:
    Code:
    char* myPtr = new char[20];
    
    __asm {
    
         MOV CX, 20
         MOV EAX, myPtr
    bucle:
         MOV [EAX], 0
         INC EAX
         DEC CX
         JNZ bucle
    }
    ????????
    i don't know...
    See more | Go to post

    Leave a comment:


  • timon
    replied to Saving info to an array, and then to a file
    in C
    well,
    there diferents to do that.
    you can use fstream (C++) or stdio (C)
    A)
    Code:
    #include <fstream>
    //load
    ifstream flu;
    flu.open ("myfile.txt");
    if (flu) {
          	flu.getline (myString, 100, '\n'); 
                //charVector, max char, char to end->you can use '#' for example
               //to separate differents fields
    
    }
    else {throw
    ...
    See more | Go to post

    Leave a comment:


  • timon
    replied to Saving info to an array, and then to a file
    in C
    well,
    there diferents to do that.
    you can use fstream or
    A)
    Code:
    #include <fstream>
    //load
    ifstream flu;
    flu.open ("myfile.txt");
    if (flu) {
          	flu.getline (myString, 100, '\n'); 
                //charVector, max char, char to end->you can use '#' for example
               //to separate differents fields
    
    }
    else {throw error(noFlujo);}
    ...
    See more | Go to post

    Leave a comment:


  • timon
    started a topic how to call a assembly implemented function in C++??
    in C

    how to call a assembly implemented function in C++??

    I used to use Dev C++, and this year i started to use C++ Builder and Visual Studio too.
    I use ml.exe to assembly my .asm and get a .obj.
    In Dev C++ there's no .obj, there's .o so i have no idea what i have to do.
    In C++ Builder i have read i must to do:
    1
    ml /c /Zf /omf function.asm
    to obtain the .obj
    2 Add the .obj to the project
    3 Introduce this line before as a kind of include (declare...
    See more | Go to post

  • thanks for the replies.
    But the problem is that there's no .cpp file with the implementation of the function. The function is implemented in a .asm file. Then i assembly the code to obtain a .obj.
    I have solved the problem jet by making a C project and without making changes in the code at all, but i want to use C++.
    if anyone knows hot to do that in another compiler could help me to.
    i may should start another discus...
    See more | Go to post

    Leave a comment:


  • [Linker Error] Unresolved external 'function_name... using assemby code

    Hello!
    i´m trying to run a project in c++ Builder (windos) that uses assembly code.
    i assembly the code with ml.exe, then i have a .obj
    i add this .obj to the project

    then in a .cpp i write

    Code:
    extern estados(char *, char *, char *, int, int)
    and then i try to call this function just as my teachers teach me to do
    and appears that:
    [Linker Error] Unresolved...
    See more | Go to post
No activity results to display
Show More
Working...