Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!ucsd!nosc!cod!bmarsh From: bmarsh@cod.NOSC.MIL (William C. Marsh) Newsgroups: comp.os.msdos.programmer Subject: Re: Finding the MCGA in Quick C 2.01 Message-ID: <2060@cod.NOSC.MIL> Date: 17 Aug 90 15:25:58 GMT References: <9042@uhccux.uhcc.Hawaii.Edu> <36267@ut-emx.UUCP> Reply-To: bmarsh@cod.nosc.mil.UUCP (William C. Marsh) Organization: Naval Ocean Systems Center, San Diego Lines: 28 Lots of people post code that looks like: > unsigned char far *mem; > > mem = 0xA000:0000; > *(mem + offset) = val; Could we please stop using code that looks like this? This is very unportable to other 80x86 C compilers! If you use the provided services in the compiler (either MSC style or TurboC style) then there is a good chance it will work elseware (Plus, it's easier to understand). Examples (Using the above): MSC: FP_SEG(mem) = 0xA000; FP_OFF(mem) = 0x0000; TurboC: MK_FP(mem, 0xA000, 0x0000); Bill -- Bill Marsh, Naval Ocean Systems Center, San Diego, CA {arpa,mil}net: bmarsh@cod.nosc.mil uucp: {ihnp4,akgua,decvax,dcdwest,ucbvax}!sdcsvax!nosc!bmarsh "If everything seems to be coming your way, you're probably in the wrong lane."