C question about Pointers and assembly

R

Roop

Hello all

I need to understand the concepts of following terminology in
C Language :--
Q1.. what is the near,far pointer mean's ? what is the difference
between the
these pointer and normal Pointer that we have decleared like that
char *ptr;

Q2.. what are the different ways of Inter Process Commnication? and
which is most Efficient

Q3.. How to use function in assembly Language?how to pass the argument
and where to store these argument?


Tarun Sinha
 
D

dandelion

Roop said:
Hello all

I need to understand the concepts of following terminology in
C Language :--
Q1.. what is the near,far pointer mean's ? what is the difference
between the
these pointer and normal Pointer that we have decleared like that
char *ptr;

The keywords 'near' and 'far' are not in the C language definition. They are
found in some compilers and denote targets in the same or another memory
segment respectively, the diffrence being one of size (a far pointer needs
to include a segment address). Do not use them, unless you have no choice.
Q2.. what are the different ways of Inter Process Commnication? and
which is most Efficient

Depends on what you are using it for.

The simplest method is communication by means of a pipe. One process writes
to it, another reads. It's simple and robust, but does not offer things like
type-checking.

Another way is shared memory, which needs a mechanism to avoid
race-conditions and *still* does not offer type

Yet another way are various RPC mechanisms, where typechecking *is*
provided, but you need external libs providing the functionality.

Many other options also exist, like opening a network connection, using
shared files, etc.
Q3.. How to use function in assembly Language? how to pass the argument
and where to store these argument?

Compiler specific. For most compilers the sequence is (more or less) as
follows:

* setup the stack frame, push arguments
* call the function
* clear the stack frame, disposing arguments.

Again, this is *not* specified by The Standard.
 
M

Mark McIntyre

Q1.. what is the near,far pointer mean's ?

near and far pointers are not part of C - they're an (obsolete) extension
used on old MS-DOS platforms to cope with the inadequacies of the hardware
for addressing more than 64K of memory (yes, 64 kilobytes...).
Q2.. what are the different ways of Inter Process Commnication? and
which is most Efficient

this is nothing to do with C. You need to ask in a group specialising in
the OS you're using as its OS specific.
Q3.. How to use function in assembly Language?how to pass the argument
and where to store these argument?

Assembly is not part of C .The answer to Q2 applies here also.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,159
Messages
2,570,881
Members
47,418
Latest member
NoellaXku

Latest Threads

Top