k061198
asked on
MK_FP
my borland 5.03 will not complile a source containing
MK_FP, eventhough I have included dos.h.
claiming that it is an undefined function.
has anybody encountered a simular problem.
By the way does anyone know any good, graphics and
game programining for c, sites.
k
MK_FP, eventhough I have included dos.h.
claiming that it is an undefined function.
has anybody encountered a simular problem.
By the way does anyone know any good, graphics and
game programining for c, sites.
k
I do not know what MK_FP is, but maybe your source was meant for another specific compiler?? (this is very common)
MK_FP might be the macro to make a FAR POINTER, which is specified to 16 bits programming (DOS). *If* Borland C++ 5.x could only compile 32 bits program, it won't recognize this macro.
I am not very sure about this (since dos programming is so far away :-) . You should check this in your BC 5 compiler manual.
I am not very sure about this (since dos programming is so far away :-) . You should check this in your BC 5 compiler manual.
Segment / Offset stuff has become meaningless in Win32, where all addresses are near. You should take a look at the code that uses that stuff, particularly how you make these segment and offset pointers. If you consistently use the library function (below) you could add new definitions for them (using segment only or intance).
Syntax
#include <dos.h>
void far * MK_FP(unsigned seg, unsigned ofs);
Description
Makes a far pointer.
MK_FP is a macro that makes a far pointer from its component segment (seg) and offset (ofs) parts.
Return Value
MK_FP returns a far pointer.
Syntax
#include <dos.h>
unsigned FP_OFF(void far *p);
unsigned FP_SEG(void far *p);
Description
Gets a far address offset or segment.
FP_OFF is a macro that gets or sets the offset of the far pointer p.
FP_SEG is a macro that gets or sets the segment value of the far pointer p.
Return Value
FP_OFF returns an unsigned integer value representing an offset value.
FP_SEG returns an unsigned integer representing a segment value.
Syntax
#include <dos.h>
void far * MK_FP(unsigned seg, unsigned ofs);
Description
Makes a far pointer.
MK_FP is a macro that makes a far pointer from its component segment (seg) and offset (ofs) parts.
Return Value
MK_FP returns a far pointer.
Syntax
#include <dos.h>
unsigned FP_OFF(void far *p);
unsigned FP_SEG(void far *p);
Description
Gets a far address offset or segment.
FP_OFF is a macro that gets or sets the offset of the far pointer p.
FP_SEG is a macro that gets or sets the segment value of the far pointer p.
Return Value
FP_OFF returns an unsigned integer value representing an offset value.
FP_SEG returns an unsigned integer representing a segment value.
Alternatively you could target the project for 16 bit Dos
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
That's an option...
ASKER