Kulwinder Atwal wrote:
> 
> To translate DPM memory is a straight forward procedure:
> 
> #define DPM_OFFSET 0xC000

Change this to:

#define DPM_OFFSET 0xC0000000

and you can use the 32 bit flat memory model like RTL and not worry
about segments and offsets in 4 GB space. 

- Kal.

> 
> #define DPM_TO_CPU (addr) (addr += DPM_OFFSET)
> 
> #define CPU_TO_DPM (addr) (addr -= DPM_OFFSET)
> 
> - Kal.
> 
> Norm Dresner wrote:
> >
> > Back in MS-DOS days, we had functions provided with the compiler to do the
> > conversions between a pointer and a segment:offset description of an address:
> >         void                    *MK_FP( ushort seg , ushort off );
> >         unsigned short  FP_SEG( void *pointer );
> >         unsigned short  FP_OFF( void *pointer );
> >
> > I have the need to do computation like this when accessing an ISA board
> > (1st 1M of memory) and when translating the addresses from the dual-ported
> > RAM from what's seen by the CPU on the board to what's seen by the PC (On
> > the board, the DPM looks like it starts at  0x1000:0 while on the PC it's
> > at 0xD000:0).
> >
> > Obviously I could roll my own replacements but before I start doing that I
> > was wondering if it had already been done -- and probably more elegantly
> > (and even more correctly) than I could do (at least the first time I do it).
> >
> > Thanks
> >         Norm
> >
> > -- [rtl] ---
> > To unsubscribe:
> > echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
> > echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
> > ---
> > For more information on Real-Time Linux see:
> > http://www.rtlinux.org/rtlinux/
> -- [rtl] ---
> To unsubscribe:
> echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
> echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
> ---
> For more information on Real-Time Linux see:
> http://www.rtlinux.org/rtlinux/
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/

Reply via email to