Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!apple!voder!pyramid!ctnews!starfish!cdold From: cdold@starfish.Convergent.COM (Clarence Dold) Newsgroups: comp.sys.ibm.pc Subject: Re: Microsoft Quickc - Pointers to arbitrary memory location Message-ID: <679@starfish.Convergent.COM> Date: 1 Sep 88 18:36:14 GMT References: <666@dogie.edu> Organization: Convergent Technologies, San Jose, CA Lines: 18 From article <666@dogie.edu>, by dorl@vms.macc.wisc.edu (Michael Dorl - MACC): > I've been trying to reference screen memory directly from Quickc. > The stuff I've tried looks something like this > > char far *p; > long i; > > p = (char far *)0xb8000; [...] The problem is in the way that Microsoft chose to implement SEGMENT:OFFSET in QuickC. The address 0xb800:0000 should appear ax 0xb8000000. This appears to be 32 bit addressing, but is actually SEGMENT followed by OFFSET, with each being 16 bits, which will then be folded into the SEG:OFF that the CPU wants to see. This topic shows up in the SAMs book 'Microsoft C on the IBM PC'. -- Clarence A Dold - cdold@starfish.Convergent.COM (408) 435-5274 ...pyramid!ctnews!mitisft!professo!dold P.O.Box 6685, San Jose, CA 95150-6685