Thread: Help edit assembler insert, i do not.

  1. #1
    Registered User
    Join Date
    Nov 2015
    Posts
    119

    Help edit assembler insert, i do not.

    Good time day!

    As correctly without errors?
    This assembler syntax I do not like.
    How to write it without error correct insertion?
    I am in any case, the assembler inserts understand very bad.

    Code:
        __asm__ (".intel_syntax noprefix\n\t"
                 "movl (%Adresa_dokumenta),%eax\n\t"
                 "movl  %eax, (Adresa_Ves_masyva)\n\t" /* ассемблерная вставка*/
               : "=r"(Adresa_dokumenta)           /* выходные операнды */
               : "r"(Adresa_dokumenta)            /* входные операнды */
               : "=c"(Adresa_Ves_masyva)           /* выходные операнды */
               : "c"(Adresa_Ves_masyva)            /* входные операнды */
               : "%eax"            /* разрушаемые регистры */
                );

  2. #2
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    2,738
    STOP USING GOOGLE TRANSLATE! Either learn english yourself, or ask someone who knows it to help you, or you could just ask help from a forum that's built for your language. Right now, you make almost zero sense...

    Anyway, the problem is that you change the accepted syntax to Intel with no-prefix, yet the next two lines are written in AT&T with prefix. Decide which one to use, you can't do both at the same time.

    Here's what I said above, in your language( google translate, of course ):
    Прекратить использование GOOGLE TRANSLATE! Либо выучить английский язык самостоятельно, или попросить кого-то, кто знает, что это, чтобы помочь вам, или вы могли бы просто попросить помощь от форума, который построен для вашего языка. Прямо сейчас, вы делаете почти нулевой смысл ...

    Во всяком случае, проблема заключается в том, что вы измените принятый синтаксис Intel, без префикса, но следующие две строки написаны в AT & T с приставкой. Решите, какой из них использовать, вы не можете сделать как в то же самое время.
    does it make any sense, at all?
    Devoted my life to programming...

  3. #3
    Registered User
    Join Date
    Nov 2015
    Posts
    119
    Thank you.
    This Code :: Blocks add compiler mingw32-g ++. Exe.
    How to write correctly?

    Error: C:\ETS-22\NOW\Pars_utf8.cpp|230|ошибка: expected «)» before «(» token|

  4. #4
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    2,738
    In GCC's inline asembly, you must use indices instead of variable names, counting from 0 of course, each one representing each of the arguments you passed to it. For example, here you'd want to replace "(%Adresa_dokumenta)" with "(%0)"
    Devoted my life to programming...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. [edit] Edit tags? [/edit]
    By dwks in forum A Brief History of Cprogramming.com
    Replies: 44
    Last Post: 07-06-2007, 10:02 AM
  2. Replies: 0
    Last Post: 07-02-2007, 12:32 AM
  3. Need to set EDIT background BLACK and EDIT text WHITE
    By Garfield in forum Windows Programming
    Replies: 3
    Last Post: 08-29-2003, 01:36 PM
  4. Edit/Rich Edit window size restrictions
    By Echidna in forum Windows Programming
    Replies: 2
    Last Post: 01-19-2002, 03:23 AM
  5. Replies: 1
    Last Post: 09-17-2001, 05:46 AM

Tags for this Thread