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/

Reply via email to