Mail Archives: djgpp/1997/08/09/08:22:12
On Mon, 28 Jul 1997 12:42:13 +0200, Alexander von Luenen
<luenen AT informatik DOT uni-bonn DOT de> wrote:
>structure, I'd need to know a 1:1 port.
>The methods are (both Symantec code):
> void AMem::GetPhysPtr(long addr)
^^^^
> {
> static uchar *pAllLowMem;
> if(pAllLowMem == NULL)
> pAllLowMem=_x386_map_physical_adress(0, 0xFFFFF);
^^^^^^^^^^^
what are these numbers represent ???
do you think that there are psychs around here ???
the nearest hit is this:
if (__djgpp_map_physical_memory(void *our_addr, unsigned long
num_bytes, unsigned long phys_addr)
cout << "Failed to map physical addresses!" << endl;
or you can use:
void * MK_FP (unsigned short seg, unsigned short ofs)
{
if ( !(_crt0_startup_flags & _CRT0_FLAG_NEARPTR) )
if (!__djgpp_nearptr_enable ())
return (void *)0;
return (void *) (seg*16 + ofs + __djgpp_conventional_base);
}
from djgpp FAQ by Charles Sandmann.
> return(pAllLowMem+addr);
how can a function returning void return long ???
> }
>
> ushort AMem::MallocLow(ushort size)
> {
> union REGS regs;
> regs.h.ah=0x48;
> regs.x.bx=(size+15)>>4;
> int86_real(0x21, ®s, ®s);
int86(0x21, ®s, ®s);
> return (regs.x.ax);
> }
get the djhlp201.zip and READ the documentation!!!
- Raw text -