🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #1913

Re: Finding the MCGA in Quick C 2.01

#1913
From: William C. Marsh
Date: Fri, 17 Aug 1990 15:25
28 lines
1262 bytes
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."
Technical Details
Message-ID: <2060@cod.NOSC.MIL>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!ucsd!nosc!cod!bmarsh
References: <9042@uhccux.uhcc.Hawaii.Edu> <36267@ut-emx.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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