This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

getting vriable address

how do i get variable address defined in C inside assembly instructions while writing some assembly instructions between C code.

Ashutosh Tiwari
Bangalore

Parents Reply Children
  • does anybody not know the answer?

    i look in the bin and not get examples.

    i wait with same problem and must have the answer!


  • "There is an example already in bin folder ..."

    Doh! Of course, the bin folder (slapping forehead with open palm) -- the first place to look for examples!"

  • "does anybody not know the answer?"

    When so many people are telling you, this is a Bad Idea, do you not think that it might be a good idea to heed that advice??

    But, if you relly want to find examples, do you really think that "bin" would be an appropriate name for a folder containing examples?!

    If you've managed to find the 'bin' folder, try looking at the other folders nearby - see if you can't find one with a more appropriate name...

  • i wait with same problem and must have the answer!

    You must have the answer? Then pay someone for doing your work. Or spend some time to teach yourself - with enough knowledge you would know if this is a good or bad idea...

  • "does anybody not know the answer?"

    Well you, for one, appear to not know the answer.

  • Per Westermark! Did you ever pay somebody to do your homework?! :) :) :)

  • The people who have the knowledge to do someone elses homework for money would probably prefer not to help. I would think most developers would prefer to earn money for solving real problems, instead of spending the time pushing people through an education they are not interested in committing themself to.

    I'm a bit surprised about the huge amount of questions on every forum I visit. People always seem to think that asking in a forum (or on a mailing list) is an excellent short-cut. But how many forums can match the speed of Google, and have the same 24x7 availability?

    I would definitely prefer 5 minutes with Google instead of 2 days on a forum. Some of the saved time could then be used to learn something new, reducing the need for yet another question tomorrow or next week.

  • Per Westermark! Did you ever pay somebody to do your homework?!
    Based on Pers answers to various topics it is proven he did not, but actually, as anyone should, did it himself.

    Doing someones homework for them (whether paid or not) is a surefire way to get somebody totally unqualified to obtain a diploma.

    Thus it is my sincere wish that anyone that 'helps' somebody by doing their homework will end up with a "copy artist" hired as their (worthless) assistant.

    Erik

  • Erik,
    I often find myself reading Per's comments with great interest. I know he did his homework by himself. But I also believe that newbies should feel at home here, knowning that they can ask questions that look trivial to you and me, but impregnable for them. don't forget: we have also been there once.

  • I have no problem, whatsoever helping with homework, that is not the issue, the issue is 'doing'

    Erik

  • If someone asks a question:

    Hi. I have been struggling with this (explicit description) problem, and I have tried (explicit list) but do not seem to manage to get it to work. Anyone who have an idea what I might have missed?

    that person will receive a number of very good answers. There are many skilled developers on this forum who will help with suggestions.

    But the problem is that a lot of people either do not do any work before switching to "forum mode", or do post questions totally void of any information about what problem they have. And most people who ask totally forget one of the most important things: What is the original problem they are trying to solve, i.e WHY are they trying to do xxx. A very large percent of questions should not get an answer to the asked question - because the correct answer is: You are on the wrong track. You should do yyy instead.

    Look specifically at this thread: Most answers in this thread tries to say that the answer to the question "How do I access C variables in my inline assembler" is: You do not! You write the full function in assembler, or you look closer at your C function and figure out if the C code can be imrpoved enough that no assembler is needed.

    Adding a: "does anybody not know the answer" doesn't change the recommended solution to the problem.

    So in short: If you look at my answers, you will notice that there are basically three kinds of answers, two of which says something like:
    - Please supply more information.
    - Please spend some time yourself.

    When the question is relevant, and there are enough information to allow an answer - and I think I know a solution, or a reasonable next step - I will take the time to give a specific answer.

    But the big problem is that most people do not want to know why something doesn't work. And they do not want to know how they can make something work. Or how they can locate the relevant information themself. Or how they can split their problem into smaller steps, to quickly find out what part of an application that misbehaves. They just want turn-key solutions supplied yesterday. And requests for turnkey solutions really should be sent to consultants. I can help people learn new tricks if they are interested, but I'm not interested in doing other peoples (home)work.

  • so,,, there are many persons here which say there are clever and talented persons here.

    i say i need answer but no body can give!!!!!

    why can not any body give the answer?????????????

    then,,,, the persons not clever and talented that they think ??????????????

  • i say i need answer but no body can give!!!!!

    you have got the answer umpteen times

    DO IT IN A .A51 MODULE

    do you want us to answer "how do I commit suicide" by "buy a rope" instead of "that is not a good idea"?

    Erik

  • then,,,, the persons not clever and talented that they think ??????????????

    When debating with a 5-year-old, you can use reverse psychology to get them to do just about anything. Since you are trying reversed psychology, I must assume that you expect answers from 5-year-olds. Alas, not too many have started with assembly programming at that age...

    If you have a school assignment that specifically requires you to use inline assembler: Please write a post telling us that. If you do not have a specific requirement to use inline assembler - do look at the suggestions you have received: Optimize your C code, or write the whole function in assembler. Just look at the disassembly of the C function - that will give you a skeleton for your new assembler file.

  • cheers, erik, you actually made me laugh, and I have to tell you - my day sucked. well done :)