Path: utzoo!attcan!uunet!ncrlnk!ncr-sd!serene!rfarris From: rfarris@serene.UUCP (Rick Farris) Newsgroups: comp.sys.ibm.pc Subject: Far pointers in MSC Summary: Try it before you flame. Message-ID: <207@serene.UUCP> Date: 13 Dec 88 05:47:45 GMT References: <464@octopus.UUCP> <10690@s.ms.uky.edu> Reply-To: rfarris@serene.cts.com (Rick Farris) Organization: Serenity Systems Lines: 33 In article <10690@s.ms.uky.edu> simon@ms.uky.edu (Simon Gales) writes: >In article <464@octopus.UUCP> pete@octopus.UUCP (Pete Holzmann) writes: >> >>unsigned far *lpts = 0x00400008L; /* Define a pointer to the LPT ports */ > >should be: > >unsigned far *lpts = 0x00000408L; /* Addr = Segment * 16 + Offset */ Either one works just fine. The MSC compiler splits the value down the middle, and loads the upper four digits into a segment register and the lower four digits into an offset register. Pete's method yields: 0040 segment 0008 offset -------- 00408 physical address Your method yields: 0000 segment 0408 offset ------- 00408 physical address Both are exactly the same. Before you claim otherwise, do a simple experiment, ok? -- Rick Farris RF Engineering POB M Del Mar, CA 92014 voice (619) 259-6793 rfarris@serene.cts.com ...!uunet!serene!rfarris serene.UUCP 259-7757