| delorie.com/archives/browse.cgi | search |
| Date: | Mon, 20 May 1996 20:58:37 -0400 |
| From: | dj (DJ Delorie) |
| Message-Id: | <199605210058.UAA22650@delorie.com> |
| To: | applea AT weiss DOT che DOT utexas DOT edu |
| CC: | djgpp AT delorie DOT com |
| In-reply-to: | <4nqe0f$som@geraldo.cc.utexas.edu> (applea@weiss.che.utexas.edu) |
| Subject: | Re: Making the nearptr hacks use longs. |
> unsigned long *videoptr = (unsigned long *)0xA0000; > videoptr[4*i + __djgpp_conventional_base] = sbuffptr[i]; Don't forget that C scales your indexes. The above expression is equivalent to this: *(long *)((char *)videoptr + 16*i + 4*__djgpp_conventional_base) Figure out the nearptr math first, *then* convert to a long*.
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |