how do i get variable address defined in C inside assembly instructions while writing some assembly instructions between C code.
Ashutosh Tiwari Bangalore
If you need to ask, you shouldn't be using inline assembly. Seriously.
Make up your mind on what you're going to program in: C, or assembler. Inline assembly will lose you more of the advantages of either than you're ever likely to win back.
There is an example already in bin folder of your computer. please check out. it may not be exactly what you wanted but it'll give a kick start.
"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?
i look in the bin and not get examples.
i wait with same problem and must have the answer!
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...
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...
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'
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 ??????????????
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"?