Customer Service Chat
Get quote & make Payment
learn,how to mix C and Assembly Language ?, Basic Computer Science
The technique to mix C and assembly language is to apply the "asm" directive. To access C-language variables from assembly language, you just use the C identifier that name is a memory operand. These variables cannot be local to a procedure, and also cannot be static within a procedure. They have to be global (but can be static global). The newline characters are essential.
unsigned long a1, r;
void junk( void )
"pushl %eax \n"
"pushl %ebx \n"
"movl $100,%eax \n"
"movl a1,%ebx \n"
"int $59 \n"
"movl %eax,r \n"
"popl %ebx \n"
"popl %eax \n"
This instance does the following:
1. Pushes the value stored in %eax and %ebx onto the stack.
2. Puts a value of 100 into %eax.
3. Copies the value in global variable a1 into %ebx.
4. Executes a software interrupt number 59.
5. Copies the value in %eax into the global variable r.
6. Restores (pops) the contents of the temporary registers %eax and %ebx.
Posted Date: 5/4/2012 8:26:11 AM | Location : United States
Ask an Expert
learn,how to mix C and Assembly Language ?, Assignment Help, Ask Question on learn,how to mix C and Assembly Language ?, Get Answer, Expert's Help, learn,how to mix C and Assembly Language ? Discussions
Write discussion on learn,how to mix C and Assembly Language ?
Your posts are moderated
Write your message here..
DATA STRUCTURE, WHAT IS DATA STRUCTURE AND EXPLAIN ME.
WHAT IS DATA STRUCTURE AND EXPLAIN ME.
Explain distributed file systems, Question 1 Write short note on ...
Question 1 Write short note on 1) NFS 2) CIFS Question 2 What is Virtual Application? Write down the benefits and drawbacks of it Questi
Process killed, 1. What actions need to be taken when a program terminates ...
1. What actions need to be taken when a program terminates or a process is killed? What if that process destruction is not the consequence of normal termination, but rather is the
Computer definition ., what is the short and complete definition of compute...
what is the short and complete definition of computer
Construct a conditional profits table, Question (a) A dairy wants to de...
Question (a) A dairy wants to determine the quantity of butter it should produce to meet the demand. Past records have shown the following demand pattern:
Basic concepts of Assembler language , Information Units In order for the P...
Information Units In order for the PC to process information, it is essential that this information be in unique cells called registers. The registers are sets of 8 or 16 flip-flop
Memory of computer, Memory : Computers store information internally as wel...
Memory : Computers store information internally as well as externally. Linked to CPU is an internal memory unit where all the instructions and data are stored. It contains the
Artificial intelligence agents, Artificial Intelligence Agents: We dis...
Artificial Intelligence Agents: We discussed what we will be talking about in Artificial Intelligence and why those things are important. This chapter is all about how we wi
Project of interactive powerpoint in human computer , Hi There, can you h...
Hi There, can you help me with my small project please, i have sent it yesterday and you dont replay. can you please ethir lem me know you can do it or no Regrads Meshari
Computer Literacy Assignment Task, Assignment Task: You are required to dev...
Assignment Task: You are required to develop working solutions in Excel that will manage the annual budget, current month’s inventory, and a list of the current month’s transaction
Accounting Assignment Help
Economics Assignment Help
Finance Assignment Help
Statistics Assignment Help
Physics Assignment Help
Chemistry Assignment Help
Math Assignment Help
Biology Assignment Help
English Assignment Help
Management Assignment Help
Engineering Assignment Help
Programming Assignment Help
Computer Science Assignment Help
IT Courses and Help
Why Us ?
~24x7 hrs Support
~Quality of Work
~Time on Delivery
~Privacy of Work
Human Resource Management
Literature Review Writing Help
Follow Us |
T & C
Copyright by ExpertsMind IT Educational Pvt. Ltd.