Search 5,000,000+ questions and answers.

Frequently Asked Questions

How do I write assembler functions which can be called from C?

HI-TECH Software Frequently Asked Questions
How do I write assembler functions which can be called from C? A: The easiest way to learn how to do anything in assembler, is to write a simple version of it in C, then use the compiler to compile it to assembly. You can then use this output as a template to your routine. For example: Say you wanted to write an assembler routine which takes a "long" type as a parameter. Firstly, write the function in C: void MyAsmFunc(unsigned long parameter) { } Now compile it to assembly.
Related Questions

Q6: Why write an Assembler in C!?

Faq - The Yasm Modular Assembler Project - Trac
A6: For maintainability, it's better to use a high-level language in commonly used code, since more people know those high-level languages and will be better able to understand and modify it properly. Also, combined with a C compiler that requires it it's symbiotically self-compiling. By writing Yasm in C, we can more easily support cross-assembling any supported output platform on any platform that supports the C we use.
Related Questions

Why is the linker giving errors for C/C++ functions being called from C++/C functions?

How to mix C and C++, C++ FAQ Lite
If you didn't get your extern "C" right, you'll sometimes get linker errors rather than compiler errors. This is due to the fact that C++ compilers usually "mangle" function names (e.g., to support function overloading) differently than C compilers.
Related Questions

Can I write my own C functions to run in my ISaGRAF program?

SIXNET - Leading the way in Industrial Ethernet, Modems, LIN...
No, but you can write your own function comprised of any of the 6 languages that ISaGRAF supports. However, with the LINUX-enabled SIXNET units you can easily write your own C or C++ functions or applications. I'm getting an error when I install ISaGRAF from the SIXNET CD? First, restart your computer and make sure not to run any SIXNET software. Make sure you don't have Power Switch in your Startup because this will automatically run SIXNET software when your computer starts up.
Related Questions

How can C functions call C++ functions?

Tech Talk about C++ and C Issues / Comeau C++ and C FAQ
What's this extern "C" thing? Most C++ compilers do something called name decoration, or name mangling. In short, in order to support C++ function overloading, and C++ type-safe linkage, most C++ compilers will tack on some type encoding information onto the end of some of your identifiers.
Related Questions

Why an assembler?

Faq - The Yasm Modular Assembler Project - Trac
A3: Its primary mention in the community is in the Linux Assembly HOWTO (section 3.5.1). Major interested groups are those who want NASM syntax combined with AMD64 support. This includes XviD amongst others.
Related Questions

How do I write graphics programs with Pacific C?

HI-TECH Software Frequently Asked Questions
I want to do some graphics programming with Pacific C, but I can't find graphics.h? Where is it? A. Pacific C is our freeware native DOS compiler, and it does not have any graphics libraries, hence there is no graphics.h. You will need to locate some suitable graphics library functions from somewhere else. There is a simple library located at http://www.cs.umb.edu/~vmay/myprograms.htm but we can't provide any help using it.Back to top error message occurred that the replacement of a file in .
Related Questions

Graphic Library: How to write programs with ECO-C?

mct.net: FAQ - Frequently Asked Questions
Example: You want to use the display TLX1741 with the ZWERG332. Your program is called "main.c" and is located in the ECO-C folder. Then you compile as follws:
Related Questions

Graphic Library: How to write programs with WinECO-C?

mct.net: FAQ - Frequently Asked Questions
The library to use depends on your target. If you have a MEGA332 for example, the appropriate library is "libgraph.a" in the folder "lib/mega332". In addition the correct low-level functions must be compiled. If you use the display TLX1741, you must add the file "tlx1741.c" in the folder "libsrc/sysshare" to your project:
Related Questions

The 60CS, 76CS and Vista C have something called "Jumpmaster." Is that anything like it sounds?

Frequently Asked Questions about the Garmin Map60C and Map60...
If you think it sounds like it has something to do with jumping out of airplanes, you are right. Jotne has a discussion in this thread. The Garmin discussion can be found here (for what it's worth). Battery life varies with how much backlighting, autorouting, etc. you do. You should get 20 hours or so from good alkaline cells or rechargeables. In a test by AtlantaGal, it appears that lithium batteries last about 3 times longer, but die with very little warning. (They also cost 3 times as much.
Related Questions

Can legacy C/assembler code be integrated with PERC applications?

Aonix - PERC - FAQ
Yes. The PERC product family supports standard JNI (Java? Native Interface) and PNI(PERC Native Interface) which allows developers to integrate C/assembler code with PERC code. PNI is a smaller, faster replacement for Sun's JNI. Even better, though, is the option to use PERC Pico instead of C or assembler. This allows you to develop all of your code using Java source, with comparable or even faster execution performance, and no JNI overhead at all.
Related Questions

Can I create my own functions in C?

Extending/Embedding FAQ
Yes, you can create built-in modules containing functions, variables, exceptions and even new types in C. This is explained in the document "Extending and Embedding the Python Interpreter" (http://docs.python.org/ext/ext.html).
Related Questions

Why doesn't C have nested functions?

Miscellaneous
It's not trivial to implement nested functions such that they have the proper access to local variables in the containing function(s), so they were deliberately left out of C as a simplification. (gcc does allow them, as an extension.) For many potential uses of nested functions (e.g. qsort comparison functions), an adequate if slightly cumbersome solution is to use an adjacent function with static declaration, communicating if necessary via a few static variables.
Related Questions

Do all of the given functions get used at one point or another in the code we have to write?

FAQ for IP Lab #1
I hear a lot of people are having trouble with the following error in lab1: Empty n_pdu IOT/Abort trap (core dumped) I think this is caused by freeing pdu's you've sent to the datalink layer with send_pdu_to_datalink. IF YOU SEND A PACKET THEN DON'T FREE IT. Just reuse the PDU_TYPE pointer without freeing. It's bad practice I suppose but otherwise the code won't work. I get the same error "Empty n_pdu" for all the cases.
Related Questions

Can I write my own candidacy functions?

mod_backhand: use your resources
byHostname.c is supplied as an example. The entire serverstats structure is available to you. This provides things like load, number of CPUs, available memory, total memory, number of Apache servers running (and number occupied) and some other things. Apparently there have been many reported problems on various sytems regarding dynamically loaded objects from dynamically loaded modules in Apache.
Related Questions

Q: Do I need to be a programmer, or know C, to write a D-Mod?

D-Mod Author's FAQ Revision 1.3
A: This kind of depends on your personal talent, and how dedicated you want to be in learning how. Dink-C might carry over the same basic style as the C programming language, but it's very different and much easier. It's more of a scripting language than a programming language. Having programming experience is a big plus, especially if it's in C, but I don't think it's absolutely necessary if you read through TUT1.
Related Questions

Does MICRO-C output assembly code? Do I need an assembler?

DDS FAQs - Answers to Frequently Asked Questions
MICRO-C generates assembly code. All developers kits include our XASM cross assembler, which our IDE and CC commands automatically run for you, giving you a "one step" compile. A command option allows you to include the 'C' source code as comments in the ASM listing. See the CATALOG for a list of processors which we directly support. We have application notes on adapting the compiler to use with CPU variants (such as extra registers/ports or differing memory maps).
Related Questions

Did Crane write a poem with these lines? (or) Did Crane ever write a story called "---"?

The Stephen Crane Society: Frequently Asked Questions
If you want to find a particular poem, story, or phrase, try the Search feature first, for it may give you an immediate answer. The Search feature searches the works and titles available at the Crane Society site. If you don't find what you're looking for, please use the Queries or Student Queries form so that your question can be posted to the site.
Related Questions

How can I call my system's unique C functions from Perl?

Perl FAQ
If these are system calls and you have the syscall() function, then you're probably in luck -- see the next question. If you're using a POSIX function, and are running perl5, you're also in luck: see POSIX(3pm) . For arbitrary library functions, however, it's not quite so straight-forward. See ''Where can I learn about linking C with Perl?''. Note: as of perl5, you probably want to just use h2xs instead, at least, if your system supports dynamic loading.
Related Questions

Are there other useful C++ string functions I can use?

CMSC 214 - Project #0 FAQ
Yes. You want to be careful when using C++ strings. For example, although it happens to be permissible to modify the characters of a C++ string, you generally use concatentation (the + operator) to increase the size of the string (there are other ways). Here are two useful functions you can use: char ch = 'A'; string str( 1, ch ); // constructor to convert character to string This constructor takes two arguments. The first is an int, which is the number of repetition.
Related Questions

Will there be plugins so I can write my own bots in C or C++?

NetBots 2.0 Official FAQ - Frequently Asked Questions
Sure would be cool. I'm looking into how to do this and from what I've seen, it's not too hard. The ultimate goal would to make NetBots open to third-party bots so that programmers who have great ideas for net agents but don't want to learn net programming could have an easy interface to the net through NetBots.
Related Questions

Can I write NCAR Graphics programs in C?

Frequently asked questions
Yes, you can use the NCAR Graphics C-bindings. Type: man ncarg_cbind man ncarg_gks_cbind for more information, or see the section "Writing a C Program" in the NCAR Graphics Fundamentals manual. For an example of an NCAR Graphics C program that uses the C-bindings, type: ncargcex c_colcon There are more examples available via ncargcex.
Related Questions

C. 4. Why write fan fiction?

J7 FAQ Page
It's a matter of control, satisfaction, and gratification. Writing fanfic is a way of seeing characters you love developed in directions you want them to go. This isn't just about doing what TPTB won't do; it's also about doing things that perhaps other fanfic writers themselves haven't managed to do or otherwise haven't gotten around to doing. It's also fundamentally about exploration.
Related Questions

What is write to a/c manager?

ICICI Bank - A Universal Bank - Faq's . . . .
Customer can communicate through this secure channel with the a/c manager and look for replies on the logged in Welcome page
Related Questions

Do I have to write applications in C?

FAQs
No. The Data Retrieval API is written in C, so it may be natural for users to develop C applications against this API. However, the Platform features a utility named awsp_cat. This utility reads CIDs from stdin and writes the raw content to stdout. Users may develop applications in arbitrary programming languages to process the awsp_cat output.
Related Questions

How do you link a C++ program to C functions?

Ans: By using the extern "C" linkage specification around the C function declarations. Programmers should know about mangled function names and type-safe linkages. Then they should explain how the extern "C" linkage specification statement turns that feature off during compilation so that the linker properly links function calls to C functions. Another acceptable answer is "I don't know. We never had to do that.
Related Questions

Can I access MapViewer functions from a C|C++|Perl|PL/SQL program?

Oracle Application Server 10G MapViewer FAQ
Yes you can, although you will have to manually construct every map request and process every map response your program received from MapViewer server. MapViewer server communicates using the standard HTTP protocol. The map request and response are encoded in XML, whose DTD is documented in the MapViewer User's Guide. As a result, as long as your program can open a URL connection and send/receive data using HTTP Post, it can then talk to MapViewer.
Related Questions

How do I redefine register symbols with the XA assembler?

HI-TECH Software Frequently Asked Questions
I want to define symbols as register names when writing XA assembler code, but once I've used equ to define a new register name, I can't later use set to redefine that name to something else. A: What happens is this; once you have defined a symbol as a register, it then becomes identical with that register, i.e. this code: areg equ r0 areg set 0 is equivalent to areg equ r0 r0 set 0 which is syntactically incorrect. The way I would do it is to use the C preprocessor, and do #define areg r0 ..
Related Questions

Got A Question? Ask Our Community!


More Questions >>

© Copyright 2007-2008 QueryCAT
About • Webmasters • Contact