From: blade DOT runner DOT shoots AT another DOT spam DOT bot (Alfons Hoogervorst) Newsgroups: comp.os.msdos.djgpp Subject: Re: Porting Symantec code to DJGPP Date: Wed, 30 Jul 1997 17:08:01 GMT Organization: The Programming with Puns Facility Message-ID: <33df729f.14585936@news3.worldaccess.nl> References: <33DC7784 DOT 2781 AT informatik DOT uni-bonn DOT de> NNTP-Posting-Host: 193.67.132.221 Lines: 63 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Lo Alexander von Luenen : From the Symantec RTL docs: -----------------------8<---------------------- _x386_map_physical_address -------------------------- Prototype void *_x386_map_physical_address(void *abs_addr, unsigned size); Description This function maps specific physical addresses. The abs_addr argument specifies the start address of the physical memory to map. The size argument indicates the size of the region, in bytes. The function is implemented for the X memory model only. Typically, you use this function to access memory mapped I/O devices. The region to be mapped must be completely above or completely below the 1MB boundary; it cannot lap over the boundary itself. The function will fail and return -1 if memory is insufficient or if the DPMI host refuses service. X-32 must allocate a minimum of 4 KB for each _x386_map_physical_address call. Return Value A near pointer that can be used to access the actual physical address requested. The device will not be accessible at the actual physical address; it will appear to be at the address returned by this function. Compatibility Phar Lap, DOSX ----------------------->8---------------------- Search the DJGPP docs for __dpmi_physical_address_mapping(). > ushort AMem::MallocLow(ushort size) > { > union REGS regs; > regs.h.ah=0x48; > regs.x.bx=(size+15)>>4; > int86_real(0x21, ®s, ®s); > return (regs.x.ax); > } int86_real() sends an interrupt to DOS, it doesn't go through the interrupt handlers of the DOS extender. DJGPP: __dpmi_simulate_real_mode_interrupt() Bye. +- Conceived through intercalation and juxtaposition -+ | systems programmer / word player avant la lettre | | proteus * worldaccess + nl | +-----------------------------------------------------+