Programming :: Calling An Asm Function From C?
Jun 4, 2010
I have a question about calling an asm function from C....It doesn't work unless I create an asm variable to hold the value of the function in....Why?Here's the code that doesn't work...
asmfile.s - version one Code: .section .data
mydata: .ascii "this is the message!
.equ mylen, . - mydata
[code]...
View 2 Replies
ADVERTISEMENT
Feb 7, 2011
I am doing a web site program and what I need is to call a C program in the PHP cloud.Do u think it would be possible? The web site would get the user input from PHP UI and pass to the C program , the C program would process the function with the user input and output the a PHP page.
View 2 Replies
View Related
Oct 17, 2010
lets look at code in C
Code:
#include <stdio.h>
#include <stdlib.h>
[code]...
View 3 Replies
View Related
Mar 9, 2011
I have a new problem; i want to call a subroutine's fortran which have a function in the argument and the compilation ran properly, but when i execute the program this shows me an "Segmentation fault". This is my c++ program:
Code: //Main.cpp
#include <stdio.h>
#include <iostream>
[code]....
View 2 Replies
View Related
Jul 6, 2011
This is my first post. I am unable to call some of the fftw3 library functions in a very simple fortran code. The code is as follows (the filename is trial.f):
Code:
program trial
implicit none
[code]...
View 5 Replies
View Related
Sep 9, 2010
My calling application will accept only strings and interger. we are replacing RSA bsafe library to openssl. using RSA bsafe, we have generated the private and public key in BER format. Then convert the keys, BER format into ASCII format to send the calling function. (these everything done by using RSA supplied bsafe library) same way i have to right using openssl..i m now able convert the RSA public and private key into DER format
rsa = RSA_generate_key(1024, 3, NULL, NULL);
{
size_t size;
[code]....
View 1 Replies
View Related
Apr 3, 2011
when i call the "system()" function from my C program everything works well, but when i try to call it from a cgi C program it doesn't work. the server log tells me this is a permission error.i have chmod'ed 755 the cgi program but it still does not work.
View 5 Replies
View Related
Apr 3, 2010
[URL]
Code:
/* bsearch example */
#include <stdio.h>
[code]...
View 1 Replies
View Related
Oct 27, 2010
I read somewhere that you should not be reading config space to determine the irq value to pass as the first argument to request_irq(). What is the proper way to determine the value of the 'irq' argument before calling this function? Hope this is the correct forum. I don't see one for drivers.
View 1 Replies
View Related
Apr 27, 2011
Error while calling capget function (EINVAL)
View 1 Replies
View Related
Aug 7, 2010
Im really new to Linux much less Compiz. When I try to start in the terminal this is what I get. What can I do?WARNING: Application calling GLX 1.3 function "glXCreatePixmap" when GLX 1.3 is not supported! This is an application bug!WARNING: Application calling GLX 1.3 function "glXDestroyPixmap" when GLX 1.3 is not supported
View 1 Replies
View Related
Sep 22, 2009
I am writing device driver in which i have to call callback function from kernel space, which are saving my data. But the callback functions are in userspace. While accessing them i am getting segmentation fault.
View 1 Replies
View Related
Feb 23, 2011
When boot-up in Ubuntu 10.04LTS and open my webpage, I can only see 1/4 of the page. The temporary fix that I have found is 'compiz --replace', BUT IS THERE A PERMANENT FIX? Below are the warnings I get after the temp. fix. compiz --replace
WARNING: Application calling GLX 1.3 function "glXCreatePixmap" when GLX 1.3 is not supported! This is an application bug! Couldn't find a perfect decorator match; trying all decorators Starting gtk-window-decorator WARNING: Application calling GLX 1.3 function "glXDestroyPixmap" when GLX 1.3 is not supported! This is an application bug!
View 9 Replies
View Related
Nov 16, 2010
Code:
#include <iostream>
using namespace std;
[code]...
View 1 Replies
View Related
May 18, 2010
I am doing some Linux kernel programming for my research project. I need to record the timestamp (by using cpuid and rdtsc) when an interrupt handler (top half) is first invoked. Due to the time critical nature of the problem itself, I have to do the timestamping inside the interrupt handler itself (the first operation when the handler is called). However, I understand that tasks that are not so time critical should be deferred to a tasklet function (bottom half) for processing because other interrupts are disabled in a (top-half) interrupt handler. I am currently out of idea on how I can pass the timestamp information that I have obtained in the interrupt handler to the corresponding tasklet function.
View 2 Replies
View Related
May 24, 2010
I want to declare a function in a function, but had no success till now, see the error code below and visit the project at sourceforge
[Code]...
View 14 Replies
View Related
Jun 20, 2010
I looked on the net for such function or example and didin't find anything, thus after having made one i guess it would be legitimate to drop it to see what others thinks of it.
#!/bin/bash
addelementtoarray()
{
local arrayname=$1
[code]....
View 10 Replies
View Related
Aug 13, 2010
I want to call c exe from java source code and i want to interact with the c program during it's execution, i am able to send the parameters to c program but i am not able to interact with it.
View 3 Replies
View Related
Feb 17, 2011
I have found a weird behaviour on a linux application. A tty seems to get closed without calling close. The program is (very simplified) as follows:
Process 1:
configure_signals()
read_config_files()
create_threads()
wait(forever)
Thread 1:
fd=open(/dev/ttyXX)
usleep(a while)
config(fd)
I have spent quite a lot of time on this problem. It seems like the file is sometimes closed when reaching config(fd), but removing the usleep(a while) seems to remove the problem.
View 1 Replies
View Related
Jul 17, 2010
I have a bash script that changes the iptables.Now i call this bash script in my php code.When this bash script is running the part of code that contains iptables instruction is not running because we need to be in superuser mode(root)
View 14 Replies
View Related
Apr 15, 2009
I'm trying to call some Fortran 95 code in C, but I'm having problems with integers not having the same value in C as in Fortran, and changing values upon each run of the program. I think it has to do with the integer type, but I don't know how to fix it. I'm running Gentoo x86. Here are the files I've got:
foo.c:
Code:
#include <stdio.h>
extern int qux_();
main() {
[code]....
View 2 Replies
View Related
Aug 19, 2010
What is the difference in perl between:
'function();'
and
'&function();'
with and without ampersand.
View 1 Replies
View Related
Jul 30, 2011
i use the sockaddr_in like this before calling bind(), it works good.
Code:
sockaddr_in serveraddr;
serveraddr.sin_port=htons(5000);
serveraddr.sin_addr.s_addr=htonl(INADDR_ANY);
serveraddr.sin_family=AF_INET;
[Code]....
View 2 Replies
View Related
May 20, 2010
I'm trying to call a system command in perl and am having an issue with it.
Here's an example of a command i'd like to call: Code: sed -i '4 c192.168.1.4 www.something.com' hosts this is the section in my perl script where I create the variable and call it: Code: $doit = `sed -i '$line c$ip $host hosts'`system($doit); The $line, $ip, and $host variables are working fine becasue I can replace that section with "prints" and they come out fine. I imagine the problem is where I am creating the $doit variable.
View 7 Replies
View Related
Jan 21, 2011
I want to call a subroutine in Fortran 90 from a c++ code. I can do it, when the fortran code have no module. But i need to call the subroutine in a fortran code that have an module. I have a simple program that shows my problem. The Fortran code is:
Code: !add2.f90
Module add2
Implicit none
Contains
[code]....
collect2: ld returned 1 exit status I Dont know where is the problem. Maybe it is in the call of the function. I found that the syntax have this form: extern void __namemodule__NMOD_namesubrutine(arg)
View 6 Replies
View Related
Apr 11, 2011
I feel like there should be a cleaner way of doing this. I have one file, for example "a.cpp", calling a function from another file, "b.cpp". Currently I have it set up so that header for "b", "b.h", has the declaration of its functions. And then I'm just including "b.h" in "a.cpp". Do I have to include the "b" header file in "a" to be able to call a function from "b"? Or is there a better way I could be doing this? Like doing something different at compile?
View 7 Replies
View Related
Oct 4, 2010
I am trying to use a software package written in ANSI C. It has a makefile which has to be executed first.
As soon as I execute it I get messages like: line i: command not found.
Commands for which I am getting errors :
CC = /usr/bin/gcc
GCCFLAGS = -c -Wall
ROOTDIR = .
My gcc compiler is located in the above directory only. In ROOTDIR also I tried giving the path in which all the required files & folders are present but still I get the command not found error in all the lines.
View 7 Replies
View Related
Feb 5, 2010
I'm trying to call some kernel functions from userspace, but I'm not sure if I'm doing it right. The functions control a pulse width modulator on an embedded platform. To pick one at random, the function:
Code:
struct pwm_device *pwm_request(int pwm_id, const char *label);
is defined in linux/pwm.h, and the implementation uses the macro EXPORT_SYMBOL(pwm_request), so I should be able to call this from user-space... right?
Anyway, I've got linux/pwm.h to #include in my source so the compiler knows what it's doing, but what do I link against? The only place in by kernel build tree where I can see a symbol pwm_request defined is in object files like vmlinux.o, built-in.o in the directory, etc. which I don't think I should be linking against.
View 2 Replies
View Related
Oct 29, 2010
I have written FORTRAN code to calculate density profile. This code will open two files ( topology and x,y,z trajectory). The trajectory file contains XYZ data coordinates for multiple frames (about 20 or 100 frames for instance). One frame contains 20736 data.
Previously this code was written to open ONLY one input XYZ data file and do the calculation and would dump the results in separate file and it was running without problem. Recently my data file get bigger in size, so I decided to break the single XYZ data file into few small parts.
Now I have modified the code so that it calls the parts of the XYZ data files ( eg: maltoTHERMO_10Frames.traj, maltoTHERMO_20Frames.traj,... and so on) and do the calculation and dump the results in the same result output file. I have tested this code just with openning the XYZ coordinates and printing into another file to see wheather it collecting the data sequently and it was working fine.
This code supposedly read the x coordinate data and calculate distance and put a count accoding the criteria in the approperiate bins. But when I let the code to do the calculation it stop and shows error. (I have indicated as !** in the code). If I enable this line, it shows error but if I disable this line, than the code do collect only the XYZ coordinates.
The code is as below:
Code:
module all_parameter
integer,parameter :: MAXATOM=20736!CHANGE
integer,parameter :: midwater=1500
integer,parameter :: TOTALFRAMES=20
[Code]....
View 8 Replies
View Related
Mar 2, 2011
I have typed the following code:
Code:
<html>
<form enctype="multipart/form-data" action="upload.php" method="POST">
[code]...
View 3 Replies
View Related