Path: utzoo!utgpu!water!watmath!clyde!att!rutgers!mailrus!uflorida!novavax!proxftl!markd From: markd@proxftl.UUCP (Mark Davidson) Newsgroups: comp.sys.ibm.pc Subject: Re: Microsoft Quickc - Pointers to arbitrary memory location Message-ID: <694@proxftl.UUCP> Date: 2 Sep 88 14:01:34 GMT References: <666@dogie.edu> Reply-To: markd@proxftl.UUCP (Mark Davidson) Organization: Proximity Technology, Ft. Lauderdale Lines: 26 Summary: Expires: Sender: Followup-To: Distribution: Keywords: In article <666@dogie.edu> dorl@vms.macc.wisc.edu (Michael Dorl - MACC) writes: >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; > for (i=0; i<0x8000; i++) { > *p = '\000'; > p++; > } (I hope this is right!) One problem I see (at least it's different from the way I tried it) is your assignment to p. If your screen memory starts at 0xb8000 (this is an absolute address), then the value you assign to p must be given in a variation of segment:offset format. In other words, say p = (char far *) 0xb8000000; and then dereference p to access a location in screen memory. I've done this in Quick C to implement pull-down menus, windows, etc (i.e., quick and dirty prototyping). -- In real life: Mark E. Davidson uflorida!novavax!proxftl!markd Proximity Technology Inc., 3511 NE 22nd Ave, Ft. Lauderdale FL, 33308 #define STANDARD_DISCLAIMER