delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/09/08:22:12

From: s2736173 AT techst02 DOT technion DOT ac DOT il (Ohad Somjen)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Porting Symantec code to DJGPP
Date: Sat, 09 Aug 1997 05:19:44 GMT
Organization: NetVision LTD.
Lines: 53
Message-ID: <33ebfdee.348033@news.netvision.net.il>
References: <33DC7784 DOT 2781 AT informatik DOT uni-bonn DOT de>
NNTP-Posting-Host: ts004p13.pop8a.netvision.net.il
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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, &regs, &regs);

       int86(0x21, &regs, &regs);

>      return (regs.x.ax);
>   }

get the djhlp201.zip and READ the documentation!!!

- Raw text -


  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019