how do i get variable address defined in C inside assembly instructions while writing some assembly instructions between C code.
Ashutosh Tiwari Bangalore
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.