hi,
I am working on an old program written in c.The program uses a
function like this
"unsigned long int far pascal ReadFile(char *buff,unsigned long int
*size)" .
Is this a PASCAL function CALL from C?Do I need to have Pascal
installed in my system.This has been written in Turbo C 2.0 under
DOS.Any information on this?
Thanks in advance.
Krishna.V.J. 6 6913
"kkrish" <cl************ ****@gmail.comw rites:
I am working on an old program written in c.The program uses a
function like this
"unsigned long int far pascal ReadFile(char *buff,unsigned long int
*size)" .
Is this a PASCAL function CALL from C?Do I need to have Pascal
installed in my system.This has been written in Turbo C 2.0 under
DOS.Any information on this?
Consult the documentation for your compiler. Both "far" and "pascal"
are non-standard. (I think "pascal" specifies a calling convention
compatible with whatever Pascal compiler it's supposed to work with;
"far" has something to do with pointer representations and memory
models, but I don't know how it applies here.)
--
Keith Thompson (The_Other_Keit h) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
* kkrish:
hi,
I am working on an old program written in c.The program uses a
function like this
"unsigned long int far pascal ReadFile(char *buff,unsigned long int
*size)" .
Is this a PASCAL function CALL from C?Do I need to have Pascal
installed in my system.This has been written in Turbo C 2.0 under
DOS.Any information on this?
Thanks in advance.
Krishna.V.J.
The above is platform-specific (PC running DOS or 16-bit Windows) and
outdated -- forget it, and implement ReadFile yourself.
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
In article <ln************ @nuthaus.mib.or g>,
Keith Thompson <ks***@mib.orgw rote:
>"kkrish" <cl************ ****@gmail.comw rites:
> "unsigned long int far pascal ReadFile(char *buff,unsigned long int *size)" .
>non-standard. (I think "pascal" specifies a calling convention compatible with whatever Pascal compiler it's supposed to work with; "far" has something to do with pointer representations and memory models, but I don't know how it applies here.)
My guess would be that the 'far' probably indicated that you
might need a 'far' (bigger than normal) pointer to the
ReadFile function itself.
--
"No one has the right to destroy another person's belief by
demanding empirical evidence." -- Ann Landers
The above is platform-specific (PC running DOS or 16-bit Windows)
and
outdated -- forget it, and implement ReadFile yourself.
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
Yes , it is platform specific.Seems you know something about this,
can you provide some more info ,please
Krishna V.J
* kkrish:
[quoting signature]
Please don't quote signatures -- removed.
>The above is platform-specific (PC running DOS or 16-bit Windows) and outdated -- forget it, and implement ReadFile yourself.
Yes , it is platform specific.Seems you know something about this,
can you provide some more info ,please
'far' signified a 32-bit pointer as opposed to a 'near' 16-bit pointer;
see the FAQ item "What are ``near'' and ``far'' pointers?" at <url:
http://c-faq.com/osdep/nearfar.html>.
'pascal' signified a Pascal-like calling convention, essentially that
the function was responsible for adjusting the stack pointer on exit.
Anyway, it doesn't matter: just implement the function yourself.
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
On 17 Jul 2006 22:01:55 -0700, in comp.lang.c , "kkrish"
<cl************ ****@gmail.comw rote:
>
The above is platform-specific (PC running DOS or 16-bit Windows)
and
>outdated -- forget it, and implement ReadFile yourself.
-- A: Because it messes up the order in which people normally read text. Q: Why is it such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail?
Yes , it is platform specific.Seems you know something about this, can you provide some more info ,please
both "far" and "pascal" are nonstandard extensions to C which date
back to the eighties when 16-bit computing was new. A websearch for
"pascal calling convention" will probably reveal all. Further
discussion is offtopic here.
--
Mark McIntyre
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Chris Gordon-Smith |
last post by:
I am tying to call a Pascal function from C++, and vice versa.
Does anyone know how to do this, or where detailed information on this topic
can be found?
For the C++ to Pascal call I have tried declaring the Pascal function as:-
extern "C" void PASCALTESTFUNC1();
within my C++ code. However, the linker is giving me an unresolved
|
by: Faith Dorell |
last post by:
I really don´t like C.You can write better programs in BASIC than in
C, if you don´t like this language.
I don´t understand how C became so popular, although much better
programming languages existed in the 70s or 80s or 90s.
Pascal is much better.
|
by: Skybuck Flying |
last post by:
Hi,
I think I understand now a bit better what the difference is between a c
compiler and a pascal compiler.
For example:
When compiling source code with a pascal compiler. The pascal compiler will
simply stop when it is missing an implementation for a procedure or
whatever.
|
by: Richard Buckshaw |
last post by:
Mimick the older C/ pascal dll parameter passing convention? - VB Class Mod?
Hello,
I have been attempting to write a VB class that would
expose its stuff to an older (ok, legacy application)
program which can load and call exported functions from
the old style dlls.
With little documentation to go on, my legacy app defines
|
by: David Scemama |
last post by:
Hi,
I'm writing a program using VB.NET that needs to communicate with a DOS
Pascal program than cannot be modified. The communication channel is through
some file databases, and I have a huge problem writing VB Double values to
the file so as the Pascal program can read them as Pascal Real values.
I've managed to find the algorithm to read the Pascal Real format and
convert it to a VB Double, but I cannot figure out the opposite...
| |
by: jacob navia |
last post by:
Programming languages come and go. Still is amazing that in this survey
from
http://www.devsource.com/article2/0,1895,2016936,00.asp
the C language comes second, right after Java.
Java
# What it is: An object-oriented programming language developed by James
Gosling and colleagues at Sun Microsystems in the early 1990s.
# Job availabilities: 14,408
|
by: dhruba.bandopadhyay |
last post by:
Am using Borland C++ 4.5 for the old dos.h APIs. It appears that newer
versions of compilers stop support for the oldskool DOS routines. Am
trying to convert/port an oldskool Pascal program that uses registers/
interrupts into C/C++.
1. What are the inline($FA); & inline($FB); Pascal functions? What is
the C/C++ equivalent?
inline($CD / $1C);
inline($9C);
|
by: SMALLp |
last post by:
Hy! I desperately need help!
I need to make application that would accept Pascal code and check if it
returns good results.
My idea is (from a beginner point of view) to make application in python
that would send code (text) to pascal compiler (Free pascal compiler
that can be used from command prompt in windows) and it would return
result and then application would show that result.
|
by: Ruud |
last post by:
Hallo allemaal,
During the conversion of my program from Pascal to C, I was more or
less able to find the C equivalent of most Pascal functions so far.
Only four gave me some real trouble. I solved them but it could be I
overlooked something.
1) In Pascal you can declare functions inside a function. AFAIK this
is not possible with C. Or am I wrong?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |