mohitnegi Posted March 12, 2014 Report Posted March 12, 2014 hello , I am making a controller which has an pre-existing driver code and make it compatible with it ... how can integrate the both ??? Quote
David Black Posted March 12, 2014 Report Posted March 12, 2014 My initial reaction is JDI. Please restate the question. Is the driver code written is assembly or C? Is there an OS presumption? Quote
dakupoto Posted March 13, 2014 Report Posted March 13, 2014 hello , I am making a controller which has an pre-existing driver code and make it compatible with it ... how can integrate the both ??? Hello Sir, First of all, in what language is the pre-existing driver code written in - Assembly of C ? If in C it is fairly easy -- two ways to do it: 1. Use header files as #include <cstdlib> #include <cstring> /* And so on ... */ 2. Use the extern command as: extern "C" { #include <stdio.h> #include <stdlib.h> /* And so on .. */ }; If the pre-existing driver code is in Assembly, a easy way would be to inline it inside the C++ code, as asm("assembly code as a string literal.") OR __asm__("assembly code as a string literal.") In addition, one could use extended Assembly. Note however, that using Assembly means that the programmer has to keep track of: 1. Register naming 2. Ordering of operands 3. Operand Size 4. Immediate Operands 5. Memory operands 6. Indexing Etc., etc. Hope that helps. Quote
mohitnegi Posted March 13, 2014 Author Report Posted March 13, 2014 My initial reaction is JDI. Please restate the question. Is the driver code written is assembly or C? Is there an OS presumption? Hello , The driver code is written in c for linux .. and wish have to make a controller which runs on this driver code .... Could you help me integrating the two .. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.