Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!snorkelwacker!bu.edu!xylogics!samsung!munnari.oz.au!uhccux!julian From: julian@uhccux.uhcc.Hawaii.Edu (Julian Cowley) Newsgroups: comp.os.msdos.programmer Subject: Finding the MCGA in Quick C 2.01 Message-ID: <9042@uhccux.uhcc.Hawaii.Edu> Date: 17 Aug 90 04:51:57 GMT Organization: University of Hawaii at Manoa Lines: 29 I've just come over from comp.lang.c where this request drew a blank expression from the members of the newsgroup. What I'm trying to do is access the MCGA screen at A000:0000. Here was my first attempt: 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 */ } The commented line caused run-time error R6013: illegal far pointer use. (Unfortunately, I do not have the manuals to look up the cause, even though this is a legitimate copy of Quick C.) The help page for the FP_* macros says that the macros won't work under certain conditions in small and medium models, but this happens in large model also. So my question boils down to this: what is the cleanest way of accessing an absolute address such as 0xa0000 in Quick C? julian cowley university of hawaii at manoa julian@uhccux.uhcc.hawaii.edu julian@uhccux.bitnet