Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!sdd.hp.com!hplabs!hpcc01!hpcuhb!hpsqf!hpopd!richardh From: richardh@hpopd.HP.COM (Richard Hancock) Newsgroups: comp.lang.c Subject: Re: Microsoft C far pointer dereferencing Message-ID: <7990017@hpopd.HP.COM> Date: 17 Aug 90 09:28:00 GMT References: <9031@uhccux.uhcc.Hawaii.Edu> Organization: HP PWD, Pinewood UK. Lines: 15 / hpopd:comp.lang.c / mfinegan@uceng.UC.EDU (michael k finegan) / 10:30 pm Aug 16, 1990 / >PutPixel (int x, int y, unsigned char c) >{ > unsigned char far *mem; > FP_SEG (mem) = 0xa000; > FP_OFF (mem) = 320 * y + x; > *mem = c; /* <-- this line gives a run-time error */ >} Why not use *((unsigned char far *)(0xA0000000L + 320*y + x)) = c;