Date: Thu, 28 May 1998 11:34:57 GMT From: Junior System Administrator Message-Id: <199805281134.LAA00308@restallnet.demon.co.uk> To: djgpp AT delorie DOT com Subject: Re: DJGPP and VGA Pointer ? Precedence: bulk On Tue, 26 May 1998 21:29:07 GMT, Jose Hernandez did scribe: > How can make a pointer to A000:0000 be made in DJGPP? The only > example I've seen that does this uses a macro not included with DJGPP, > MK_FP(). Here's a DJGPP version of 'MK_FP()' (snatched from the FAQ :-): -------------------->8 Cut here 8<-------------------- #include #include void *MK_FP(unsigned short seg, unsigned short off) { if (!(_crt0_startup_flags & _CRT0_FLAG_NEARPTR)) if (!__djgpp_nearptr_enable()) return((void *) 0); return((void *) (seg * 16 + off + __djgpp_conventional_base)); } -------------------->8 Cut here 8<-------------------- Hope this helps, Pete =:-) /*************** [burdock] ****************/ /* ____/| pete AT restall DOT net */ /* \ o.O| http://www.restall.net/petes/ */ /* =(_)= */ /* U [FORGET THE ABOVE URL] */ /******************************************/ /******************************* [Windoze 95] ********************************/ /* Windows 95: n. (Author Unknown). */ /* 32 bit extensions and a graphical shell for a 16 bit patch to an 8 bit */ /* operating system originally coded for a 4 bit microprocessor, written */ /* by a 2 bit company that can't stand 1 bit of competition. */ /*****************************************************************************/